MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / setExplode

Method setExplode

src/clientbase/Player.cpp:409–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407
408
409void Player::setExplode(const BzTime& t) {
410 if (!isAlive()) {
411 return;
412 }
413
414 explodeTime = t;
415
416 const short setBits = short(PlayerState::Exploding)
417 | short(PlayerState::Falling);
418 const short clearBits = short(PlayerState::Alive);
419 setStatus((getStatus() | setBits) & ~clearBits);
420
421 paused = false;
422
423 if (avatar) {
424 avatar->explode();
425 updateFlagEffect(Flags::Null); // setup the flag effect to revert to normal
426 }
427}
428
429
430void Player::setTeleport(const BzTime& t, short srcID, short dstID) {

Callers 3

handlePlayerUpdateFunction · 0.80
handleKilledMessageFunction · 0.80
handleKilledMessageFunction · 0.80

Calls 2

getStatusFunction · 0.85
explodeMethod · 0.80

Tested by

no test coverage detected