- scriptified the weapon firing logic.

This commit is contained in:
Christoph Oelckers 2017-05-01 01:55:35 +02:00
commit b84f7bcada
8 changed files with 289 additions and 362 deletions

View file

@ -446,46 +446,6 @@ FState *AWeapon::GetReadyState ()
return nullptr;
}
//===========================================================================
//
// AWeapon :: GetAtkState
//
//===========================================================================
FState *AWeapon::GetAtkState (bool hold)
{
IFVIRTUAL(AWeapon, GetAtkState)
{
VMValue params[2] = { (DObject*)this, hold };
VMReturn ret;
FState *retval;
ret.PointerAt((void**)&retval);
VMCall(func, params, 2, &ret, 1);
return retval;
}
return nullptr;
}
//===========================================================================
//
// AWeapon :: GetAtkState
//
//===========================================================================
FState *AWeapon::GetAltAtkState (bool hold)
{
IFVIRTUAL(AWeapon, GetAltAtkState)
{
VMValue params[2] = { (DObject*)this, hold };
VMReturn ret;
FState *retval;
ret.PointerAt((void**)&retval);
VMCall(func, params, 2, &ret, 1);
return retval;
}
return nullptr;
}
//===========================================================================
//
// AWeapon :: GetStateForButtonName