mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Bugfix: Multiplayer: Fixed crash when trowing items (by Realist)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2829,7 +2829,26 @@ void recieveGRENADE (RPCParameters *rpcParameters)
|
||||
|
||||
// Do grenade animation (todo fix this for mortars)
|
||||
if (gren->IsThrownGrenade)
|
||||
{
|
||||
{
|
||||
Assert(pThrower->pThrowParams == NULL);
|
||||
|
||||
// not a mem leak
|
||||
// will be freed in AdjustToNextAnimationFrame(SOLDIERTYPE*), case 461
|
||||
pThrower->pThrowParams = (THROW_PARAMS*) malloc(sizeof(THROW_PARAMS));
|
||||
pThrower->pThrowParams->dForceX = gren->dForceX;
|
||||
pThrower->pThrowParams->dForceY = gren->dForceY;
|
||||
pThrower->pThrowParams->dForceZ = gren->dForceZ;
|
||||
pThrower->pThrowParams->dLifeSpan = gren->dLifeSpan;
|
||||
pThrower->pThrowParams->dX = gren->dX;
|
||||
pThrower->pThrowParams->dY = gren->dY;
|
||||
pThrower->pThrowParams->dZ = gren->dZ;
|
||||
pThrower->pThrowParams->ubActionCode = gren->ubActionCode;
|
||||
pThrower->pThrowParams->uiActionData = gren->uiActionData;
|
||||
}
|
||||
|
||||
HandleSoldierThrowItem( pThrower, gren->sTargetGridNo );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user