MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / aObjApplyDamage

Function aObjApplyDamage

scripts/DallasFuncs.cpp:1909–1918  ·  view source on GitHub ↗

$$ACTION Objects Damage object [o:Object] by [f:DamageAmount] aObjApplyDamage Damage object Applies damage to an object Parameters: Object: the object to damage DamageAmount: how much damage to apply to the object (scaled by difficulty level) $$END */

Source from the content-addressed store, hash-verified

1907$$END
1908*/
1909void aObjApplyDamage(int objref, float damage) {
1910 msafe_struct mstruct;
1911
1912 mstruct.objhandle = objref;
1913 mstruct.killer_handle = objref;
1914 mstruct.damage_type = 0;
1915 mstruct.amount = damage;
1916
1917 MSafe_CallFunction(MSAFE_OBJECT_DAMAGE_OBJECT, &mstruct);
1918}
1919
1920/*
1921Death info

Callers 11

CallEventMethod · 0.85
DoStingAttackMethod · 0.85
aKillBotsNearObjFunction · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected