Time Freeze Powerups why spectators are affected?

General discussion of the port and Doom-related chat.
Post Reply
User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

Time Freeze Powerups why spectators are affected?

#1

Post by fr blood » Wed Mar 09, 2016 8:55 pm

All is said in the title.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Time Freeze Powerups why spectators are affected?

#2

Post by Ænima » Wed Mar 09, 2016 9:33 pm

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Time Freeze Powerups why spectators are affected?

#3

Post by ibm5155 » Wed Mar 09, 2016 10:26 pm

good question, but, spectators (at least online) are nothing, they don't have a soul :(
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Time Freeze Powerups why spectators are affected?

#4

Post by Ænima » Thu Mar 10, 2016 1:41 am

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

RE: Time Freeze Powerups why spectators are affected?

#5

Post by SwordGrunt » Thu Mar 10, 2016 2:30 am

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.
Last edited by SwordGrunt on Thu Mar 10, 2016 2:30 am, edited 1 time in total.

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Time Freeze Powerups why spectators are affected?

#6

Post by fr blood » Thu Mar 10, 2016 7:09 am

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.

User avatar
Doomkid
Frequent Poster Miles card holder
Posts: 943
Joined: Sun Nov 25, 2012 2:04 am
Location: Aussie Land
Clan: UniDoom
Clan Tag: [UD]
Contact:

RE: Time Freeze Powerups why spectators are affected?

#7

Post by Doomkid » Thu Mar 10, 2016 9:04 am

It's a minor thing, but it would be pretty awesome as a DMflag.
Image
Image

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Time Freeze Powerups why spectators are affected?

#8

Post by Ænima » Thu Mar 10, 2016 10:31 am

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Time Freeze Powerups why spectators are affected?

#9

Post by ibm5155 » Thu Mar 10, 2016 12:44 pm

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
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
ZZYZX
Posts a lot
Posts: 742
Joined: Thu Jun 07, 2012 5:56 pm
Location: Ukraine
Clan: A3
Clan Tag: [A3]

RE: Time Freeze Powerups why spectators are affected?

#10

Post by ZZYZX » Thu Mar 10, 2016 12:56 pm

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.
Last edited by ZZYZX on Thu Mar 10, 2016 1:06 pm, edited 1 time in total.

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

RE: Time Freeze Powerups why spectators are affected?

#11

Post by SwordGrunt » Thu Mar 10, 2016 1:16 pm

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.

User avatar
ZZYZX
Posts a lot
Posts: 742
Joined: Thu Jun 07, 2012 5:56 pm
Location: Ukraine
Clan: A3
Clan Tag: [A3]

RE: Time Freeze Powerups why spectators are affected?

#12

Post by ZZYZX » Fri Mar 11, 2016 4:35 am

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.
Last edited by ZZYZX on Fri Mar 11, 2016 4:37 am, edited 1 time in total.

Post Reply