|
MCommand Continued
The thread got rolledback. How would i define the ShotCMD and MCommand* in this code
class ZpostShot
{
float *pos
float *dir
int sel_type
int wep_type
} FireWeapon1;
void ZPostShotWeapon1()
{
MCommand* ShotCMD = ZNewCmd(2732);
ShotCMD->AddParameter(FireWeapon1.pos);
ShotCMD->AddParameter(FireWeapon1.dir);
ShotCMD->AddParameter(FireWeapon1.sel_type);
ShotCMD->AddParameter(FireWeapon1.wep_type);
ZPostCommand( ShotCMD ); //this executes it
// ShotCMD will naturally be freed eventually
}
Last edited by themonk214; 11-06-2009 at 11:48 AM.
|