Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override void WorldTick() {
- if (players[consoleplayer].mo.FindInventory("PK_DemonWeapon"))
- Shader.SetEnabled( players[consoleplayer], "DemonMorph", true);
- else
- Shader.SetEnabled( players[consoleplayer], "DemonMorph", false);
- bool demonMorphActive = false;
- for (int pn = 0; pn < MAXPLAYERS; pn++) {
- if (!playerInGame[pn])
- continue;
- PlayerInfo player = players[pn];
- PlayerPawn mo = player.mo;
- if (!player || !mo)
- continue;
- let weap = PK_DemonWeapon(mo.FindInventory("PK_DemonWeapon"));
- demonMorphActive |= (weap != null);
- }
- if (demonMorphActive) {
- for (int i = 0; i < demontargets.Size(); i++) {
- if (demontargets[i] && !(demontargets[i].FindInventory("PK_SlowMoControl")) && !(demontargets[i].FindInventory("PK_DemonWeapon")))
- demontargets[i].GiveInventory("PK_SlowMoControl",1);
- }
- }
- else {
- for (int i = 0; i < demontargets.Size(); i++) {
- if (demontargets[i])
- demontargets[i].TakeInventory("PK_SlowMoControl",1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement