MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zEntPlayerKillCarry

Function zEntPlayerKillCarry

src/SB/Game/zEntPlayer.cpp:316–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void zEntPlayerKillCarry()
317{
318 if (!globals.player.carry.grabbed)
319 {
320 return;
321 }
322
323 if (!zThrown_KillFruit(globals.player.carry.grabbed))
324 {
325 if (globals.player.carry.grabbed->baseType == eBaseTypeDestructObj)
326 {
327 zEntEvent(globals.player.carry.grabbed, eEventDestroy);
328 }
329 else if (globals.player.carry.grabbed->baseType == eBaseTypeNPC &&
330 (((xNPCBasic*)globals.player.carry.grabbed)->SelfType() & 0xffffff00) == 'NTT\0')
331 {
332 zNPCTiki* tiki = (zNPCTiki*)globals.player.carry.grabbed;
333 tiki->Damage(DMGTYP_THUNDER_TIKI_EXPLOSION, NULL, NULL);
334 }
335 else if (globals.player.carry.grabbed->baseType == eBaseTypeNPC)
336 {
337 zThrown_LaunchDir(globals.player.carry.grabbed,
338 (xVec3*)&globals.player.ent.model->Mat->at);
339 }
340 }
341 globals.player.carry.grabbed = NULL;
342}
343
344void zEntPlayerControlOn(zControlOwner owner)
345{

Callers 2

zEntPlayerControlOffFunction · 0.85
SlideTrackCBFunction · 0.85

Calls 5

zThrown_LaunchDirFunction · 0.85
SelfTypeMethod · 0.80
zThrown_KillFruitFunction · 0.70
zEntEventFunction · 0.50
DamageMethod · 0.45

Tested by

no test coverage detected