Page 1 of 1

Time Freeze Powerups why spectators are affected?

Posted: Wed Mar 09, 2016 8:55 pm
by fr blood
All is said in the title.

RE: Time Freeze Powerups why spectators are affected?

Posted: Wed Mar 09, 2016 9:33 pm
by Ænima
Probably because they exist as invisible actors ingame, and all actors that aren't the activator or an ally get frozen by it.

You can try adding +NOTIMEFREEZE to the player actor, or make a tracker ticket to exempt spectators from time freeze.

RE: Time Freeze Powerups why spectators are affected?

Posted: Wed Mar 09, 2016 10:26 pm
by ibm5155
good question, but, spectators (at least online) are nothing, they don't have a soul :(

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 1:41 am
by Ænima
spectators definitely exist in the map. if you look at the automap after someone joins the server in survival, you'll see an arrow of that player's color sitting at the start room. it stays there even if the spectator is moving around (on their end), which leads me to believe that spectators' positions are not sync'd with the server, probably because it doesn't matter to players.

There was also once a time when spectators could activate items if you defined a player class that started with that item ... which meant that activating the cloaking sphere in the old Mercenaries version under Skulltag 97c resulted in a translucent but visible Stealth playerpawn frozen in the air in the spawn area of a map. If the "dummy" playerpawns of spectators can be affected by items and ACS specials then I think adding +NOTIMEFREEZE to the actor itself might be worth a shot.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 2:30 am
by SwordGrunt
If you need spectators not to be affected in a mod, create a Time Freeze item derived from CustomInventory, and call ACS to check if the player is a spectator (Zandronum has an ACS function for that), else give him the real Time Freeze.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 7:09 am
by fr blood
Aenima is right, if you summon something as spectator, the monster/item will spawn at you original position(where the arrow is on the minimap).

So if there is an actor dealing with that it would be cool to know his name so we can add the NOTIMEFREEZE flag on it.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 9:04 am
by Doomkid
It's a minor thing, but it would be pretty awesome as a DMflag.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 10:31 am
by Ænima
fr blood wrote: So if there is an actor dealing with that it would be cool to know his name so we can add the NOTIMEFREEZE flag on it.
It should just be the playerclass actor, whatever you replaced DoomPlayer with.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 12:44 pm
by ibm5155
That's because the server only stores the last valid position from the player, so when you join a server, your last valid position doesn't exist, so it's 0,0,0 or some player Spawn position

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 12:56 pm
by ZZYZX
fr blood wrote:Aenima is right, if you summon something as spectator, the monster/item will spawn at you original position(where the arrow is on the minimap)
Although you can hack your client to send ticcmd instead of spectator info, and enable noclip in client, so that your serverside position will approximately match your clientside position (works only as long as you have 100% stable internet connection tho)

/halfunrelated

On topic, I'd make CustomInventory item that does A_ChangeFlag of NOTIMEFREEZE to true and another item that does the same but to false, then use this script

Code: Select all

script "SpectatorExemptFromFreeze" ENTER CLIENTSIDE
{
  bool wasspec = false;
  while (true)
  {
    bool isspec = PlayerIsSpectator(PlayerNumber());
    if (isspec && !wasspec) GiveInventory("ItemFreezeOff");
    else if (!isspec && wasspec) GiveInventory("ItemFreezeOn"); // to sync prediction
    Delay(1);
  }
}
Zandronum REALLY misses a function to set activator to indexed player above 8.
For example my script above has a huge problem: when player spectates, the ENTER script is stopped! The script should be OPEN CLIENTSIDE and work with ConsolePlayerNumber() instead.

RE: Time Freeze Powerups why spectators are affected?

Posted: Thu Mar 10, 2016 1:16 pm
by SwordGrunt
Enter scripts don't stop when you spectate/disconnect. I've had problems with this before and had to shut them down manually by using PlayerInGame. Maybe they're supposed to (and they really should) but they don't, at least not always.

RE: Time Freeze Powerups why spectators are affected?

Posted: Fri Mar 11, 2016 4:35 am
by ZZYZX
There's a CVar that should be set for them to be stopped. Or this only applies to ENTER scripts?

You see, there was (is?) a problem with HUDTimer in CTF that doesn't work at all while you are spectating.
Which is essentially an ENTER script.
And that's only fixed by sv_dontstopplayerscriptsondisconnect or whatever other longass compatflag name.