I don't know, but:
if (Explosion)
{
if (Is_Beacon(Explosion))
{
const char* Beacon = Get_Translated_Preset_Name(Explosion);
KillWeapon = Beacon;
delete []Beacon;
}
else if (Is_C4(Explosion))
{
int C4Mode = Get_C4_Mode(Explosion);
if (C4Mode == 1)
{
KillWeapon = "Remote C4";
}
else if (C4Mode == 2)
{
KillWeapon = "Timed C4";
}
else if (C4Mode == 3)
{
KillWeapon = "Proxy C4";
}
}
}
if (Explosion)
{
if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_BeaconGameObj() )
{
const char* Beacon = Get_Translated_Preset_Name(Explosion);
KillWeapon = Beacon;
delete []Beacon;
}
else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_C4GameObj() )
{
int C4Mode = Get_C4_Mode(Explosion);
if (C4Mode == 1)
{
KillWeapon = "Remote C4";
}
else if (C4Mode == 2)
{
KillWeapon = "Timed C4";
}
else if (C4Mode == 3)
{
KillWeapon = "Proxy C4";
}
}
}
The only difference is where the Is_C4 and Is_Beacon is. Notice how you check a completely different object than Iran's code does...
EDIT: Oh NOW I see, you check the GameObject "obj" to see if it's a C4/Beacon or not, and then Iran's code goes on doing its thing with the Explosion object.
I don't mean to be rude, but you obviously have no clue what you are doing.
[Updated on: Tue, 12 June 2012 16:14]
Report message to a moderator