Fixed two small bugs in the EntHier message:

- Heavy armor would not propagate player angle
- EntHier updates would never delete an entity

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@78 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-04-14 15:04:41 +00:00
parent 045b7f22c5
commit 2d33fd9437

View file

@ -1986,7 +1986,7 @@ const int kPositionNetworkConstant = 25;
MESSAGE_END(); MESSAGE_END();
MESSAGE_BEGIN( MSG_ONE, g_msgUpdateEntityHierarchy, NULL, pev ); MESSAGE_BEGIN( MSG_ONE, g_msgUpdateEntityHierarchy, NULL, pev );
} }
WriteEntHier( new_current->first, new_current->second, false, short_data, long_data ); WriteEntHier( new_current->first, new_current->second, true, short_data, long_data );
WRITE_SHORT(short_data); WRITE_SHORT(short_data);
WRITE_LONG(long_data); WRITE_LONG(long_data);
} }
@ -2014,6 +2014,7 @@ const int kPositionNetworkConstant = 25;
case AVH_USER3_ALIEN_PLAYER1: case AVH_USER3_ALIEN_PLAYER2: case AVH_USER3_ALIEN_PLAYER1: case AVH_USER3_ALIEN_PLAYER2:
case AVH_USER3_ALIEN_PLAYER3: case AVH_USER3_ALIEN_PLAYER4: case AVH_USER3_ALIEN_PLAYER3: case AVH_USER3_ALIEN_PLAYER4:
case AVH_USER3_ALIEN_PLAYER5: case AVH_USER3_ALIEN_EMBRYO: case AVH_USER3_ALIEN_PLAYER5: case AVH_USER3_ALIEN_EMBRYO:
case AVH_USER3_HEAVY:
{ {
int angle = (WrapFloat(ent.mAngle, 0, 360) / 360.0f) * 16; int angle = (WrapFloat(ent.mAngle, 0, 360) / 360.0f) * 16;
short_data = (ent.mSquadNumber << 10) | (angle << 6) | (index << 1) | 1; short_data = (ent.mSquadNumber << 10) | (angle << 6) | (index << 1) | 1;