MCPcopy Create free account
hub / github.com/assaultcube/AC / attack

Function attack

source/src/physics.cpp:847–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845dir(right, strafe, -1, k_right, k_left)
846
847void attack(bool on)
848{
849 if(intermission || (ispaused && player1->state == CS_ALIVE) || ispaused) return;
850 if(editmode) editdrag(on);
851 else if(player1->state==CS_DEAD || player1->state==CS_SPECTATE)
852 {
853 if(!on) tryrespawn();
854 }
855 else player1->attacking = on;
856}
857
858void jumpn(bool on)
859{

Callers 3

selectweaponFunction · 0.85
quicknadethrowFunction · 0.85
attackMethod · 0.85

Calls 2

editdragFunction · 0.85
tryrespawnFunction · 0.85

Tested by

no test coverage detected