Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byrnaKillsEWeapons(int sfx)
- {
- bool byrnabeam;
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- {
- lweapon b = Screen->LoadLWeapon(q);
- if ( b->ID != LW_BYRNA ) continue;
- for ( int w = Screen->NumEWeapons(); w > 0; --w )
- {
- eweapon p = Screen->LoadEWeapon(w);
- if ( p->CollDetection )
- {
- if ( Collision(b,p) )
- {
- b->DeadState = WDS_DEAD;
- p->DeadState = WDS_DEAD;
- Game->PlaySound(sfx);
- }
- }
- }
- }
- }
- byrnaReflectsEWeapons(int sfx)
- {
- bool byrnabeam;
- for ( int q = Screen->NumLWeapons(); q > 0; --q )
- {
- lweapon b = Screen->LoadLWeapon(q);
- if ( b->ID != LW_BYRNA ) continue;
- for ( int w = Screen->NumEWeapons(); w > 0; --w )
- {
- eweapon p = Screen->LoadEWeapon(w);
- if ( p->CollDetection )
- {
- if ( Collision(b,p) )
- {
- b->DeadState = WDS_DEAD;
- if ( p->Angular )
- {
- p->Angle = WrapDegrees(p->Angle - 180);
- }
- else
- {
- p->Flip = FlipRev(p->Dir);
- p->Dir = DirRev(p->Dir);
- }
- Game->PlaySound(sfx);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement