Member
AD: MetinTwo - Feel the Real Metin Experience! - Coming Soon CLICK FOR PRESENTATION!
Hi team,
1) I have an issue with buildings in the guild land. The issue happens only when I sur Z rotation and in the player.object in sql it add the related value in z_rot. If I put 0 in the z_rot or if I remove the z_rotation option in the client, the problem is "solved".
Do you know what can cause this problem?
syserr/syslog ( I ried with an item without Z_rotation and with an item with Z_rotation:
I mean, it doesn't affect nothing so I could just remove the error message from source code but I don't know what do you think? thank you
2) Also. I have a second issue with "information guild land" tab that is not working, also after I buy the terrain and I put a building, it doesn't do nothing when I click on the tab.

1) I have an issue with buildings in the guild land. The issue happens only when I sur Z rotation and in the player.object in sql it add the related value in z_rot. If I put 0 in the z_rot or if I remove the z_rotation option in the client, the problem is "solved".
Do you know what can cause this problem?
syserr/syslog ( I ried with an item without Z_rotation and with an item with Z_rotation:
(Without z_rotation)
Nov 5 17:44:39 :: COMMAND: Magic: build
Nov 5 17:44:39 :: BUILDING: FindLand 1 434808 944740
Nov 5 17:44:39 :: RequestCreateObject(vnum=14300, map=1, pos=(25054,49046), rot=(0.0,0.0,0.0) region(409600,896000 ~ 512000,1024000)
Nov 5 17:44:39 :: BUILD: material 0 90010 5
Nov 5 17:44:39 :: OBJ: id 20 vnum 14300 map 1 pos 434654x945046
Nov 5 17:44:39 :: ObjectInsertPacket vid 35132 vnum 14300 rot 0.000000 0.000000 0.000000
(with z_rotation)
Nov 5 17:45:38 :: COMMAND: Magic: build
Nov 5 17:45:38 :: BUILDING: FindLand 1 434808 944740
Nov 5 17:45:38 :: RequestCreateObject(vnum=14300, map=1, pos=(25397,49088), rot=(0.0,0.0,38.0) region(409600,896000 ~ 512000,1024000)
SYSERR: Nov 5 17:45:38 :: ForAttrRegionFreeAngle: SECTREE_MANAGER::ForAttrRegion - Unhandled exception. MapIndex: 1
Nov 5 17:45:38 :: BUILD: material 0 90010 5
Nov 5 17:45:38 :: OBJ: id 21 vnum 14300 map 1 pos 434997x945088
Nov 5 17:45:38 :: ObjectInsertPacket vid 35133 vnum 14300 rot 0.000000 0.000000 38.000000
SYSERR: Nov 5 17:45:38 :: ForAttrRegionFreeAngle: SECTREE_MANAGER::ForAttrRegion - Unhandled exception. MapIndex: 1
I mean, it doesn't affect nothing so I could just remove the error message from source code but I don't know what do you think? thank you
bool SECTREE_MANAGER::ForAttrRegionFreeAngle( long lMapIndex, long lCX, long lCY, long lCW, long lCH, long lRotate, DWORD dwAttr, EAttrRegionMode mode )
{
float fx1 = (-lCW/2) * sinf(float(lRotate)/180.0f*3.14f) + (-lCH/2) * cosf(float(lRotate)/180.0f*3.14f);
float fy1 = (-lCW/2) * cosf(float(lRotate)/180.0f*3.14f) - (-lCH/2) * sinf(float(lRotate)/180.0f*3.14f);
float fx2 = (+lCW/2) * sinf(float(lRotate)/180.0f*3.14f) + (-lCH/2) * cosf(float(lRotate)/180.0f*3.14f);
float fy2 = (+lCW/2) * cosf(float(lRotate)/180.0f*3.14f) - (-lCH/2) * sinf(float(lRotate)/180.0f*3.14f);
float fx3 = (-lCW/2) * sinf(float(lRotate)/180.0f*3.14f) + (+lCH/2) * cosf(float(lRotate)/180.0f*3.14f);
float fy3 = (-lCW/2) * cosf(float(lRotate)/180.0f*3.14f) - (+lCH/2) * sinf(float(lRotate)/180.0f*3.14f);
float fx4 = (+lCW/2) * sinf(float(lRotate)/180.0f*3.14f) + (+lCH/2) * cosf(float(lRotate)/180.0f*3.14f);
float fy4 = (+lCW/2) * cosf(float(lRotate)/180.0f*3.14f) - (+lCH/2) * sinf(float(lRotate)/180.0f*3.14f);
float fdx1 = fx2 - fx1;
float fdy1 = fy2 - fy1;
float fdx2 = fx1 - fx3;
float fdy2 = fy1 - fy3;
if (0 == fdx1 || 0 == fdx2)
{
sys_err( "SECTREE_MANAGER::ForAttrRegion - Unhandled exception. MapIndex: %d", lMapIndex );
return false;
}
float fTilt1 = float(fdy1) / float(fdx1);
float fTilt2 = float(fdy2) / float(fdx2);
float fb1 = fy1 - fTilt1*fx1;
float fb2 = fy1 - fTilt2*fx1;
float fb3 = fy4 - fTilt1*fx4;
float fb4 = fy4 - fTilt2*fx4;
float fxMin = min(fx1, min(fx2, min(fx3, fx4)));
float fxMax = max(fx1, max(fx2, max(fx3, fx4)));
for (int i = int(fxMin); i < int(fxMax); ++i)
{
float fyValue1 = fTilt1*i + min(fb1, fb3);
float fyValue2 = fTilt2*i + min(fb2, fb4);
float fyValue3 = fTilt1*i + max(fb1, fb3);
float fyValue4 = fTilt2*i + max(fb2, fb4);
float fMinValue;
float fMaxValue;
if (abs(int(fyValue1)) < abs(int(fyValue2)))
fMaxValue = fyValue1;
else
fMaxValue = fyValue2;
if (abs(int(fyValue3)) < abs(int(fyValue4)))
fMinValue = fyValue3;
else
fMinValue = fyValue4;
for (int j = int(min(fMinValue, fMaxValue)); j < int(max(fMinValue, fMaxValue)); ++j) {
if ( ForAttrRegionCell( lMapIndex, lCX + (lCW / 2) + i, lCY + (lCH / 2) + j, dwAttr, mode ) )
return true;
}
}
return mode == ATTR_REGION_MODE_CHECK ? false : true;
}
2) Also. I have a second issue with "information guild land" tab that is not working, also after I buy the terrain and I put a building, it doesn't do nothing when I click on the tab.

Last edited: