-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
94 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
class Toby_DropoffDetectorHandler : EventHandler | ||
{ | ||
override void PlayerSpawned (PlayerEvent e) | ||
Toby_ClassIgnoreListLoaderStaticHandler wallHitIgnoreListLoader; | ||
|
||
override void OnRegister() | ||
{ | ||
let player = players [e.PlayerNumber].mo; | ||
player.GiveInventory ("Toby_DropoffSoundEmitterManagerItem", 1); | ||
wallHitIgnoreListLoader = Toby_ClassIgnoreListLoaderStaticHandler.GetInstance(); | ||
} | ||
|
||
override void PlayerSpawned(PlayerEvent e) | ||
{ | ||
Actor playerActor = players[e.PlayerNumber].mo; | ||
playerActor.GiveInventory("Toby_DropoffSoundEmitterManagerItem", 1); | ||
|
||
Toby_DropoffSoundEmitterManagerItem manager = Toby_DropoffSoundEmitterManagerItem(playerActor.FindInventory("Toby_DropoffSoundEmitterManagerItem")); | ||
manager.SetHandlerReference(self); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
class Toby_WallHit : Actor | ||
{ | ||
Toby_DropoffDetectorHandler handler; | ||
|
||
default | ||
{ | ||
Radius 9; | ||
Height 8; | ||
Speed 2; | ||
Health 1; | ||
Damage 0; | ||
Projectile; | ||
+NOTIMEFREEZE; | ||
+NOBLOCKMAP; | ||
+BLOCKASPLAYER; | ||
-NOGRAVITY; | ||
DeathSound "misc/wallhit"; | ||
} | ||
|
||
States | ||
{ | ||
Spawn: | ||
TNT1 A 1; | ||
TNT1 A 1; | ||
TNT1 A 3; | ||
TNT1 A 0; | ||
Stop; | ||
|
||
Death: | ||
TNT1 A 1; | ||
Stop; | ||
} | ||
|
||
void SetHandlerReference(Toby_DropoffDetectorHandler handler) | ||
{ | ||
self.handler = handler; | ||
} | ||
|
||
override int SpecialMissileHit(Actor victim) | ||
{ | ||
if (!handler) { return Super.SpecialMissileHit(victim); } | ||
if (handler.wallHitIgnoreListLoader.IsInIgnoreList(victim, handler.wallHitIgnoreListLoader.wallHitIgnoreList)) { return 1; } | ||
return Super.SpecialMissileHit(victim); | ||
} | ||
|
||
override bool CanCollideWith(Actor other, bool passive) | ||
{ | ||
if (!handler) { return Super.CanCollideWith(other, passive); } | ||
if (handler.wallHitIgnoreListLoader.IsInIgnoreList(other, handler.wallHitIgnoreListLoader.wallHitIgnoreList)) { return false; } | ||
return Super.CanCollideWith(other, passive); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.