Check if currently in a demo playback?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

Check if currently in a demo playback?

#1

Post by Vincent(PDP) » Sat Apr 11, 2015 12:44 am

I would like to know if there's a way to check (via ACS) if you're in a normal game or in a Demo playback. This is because some ACS functions are executed in the demo that increases the values of cvars, which should only be modified when you are actually playing the game.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: Check if currently in a demo playback?

#2

Post by Dusk » Sat Apr 11, 2015 1:47 pm

Sounds like you're hitting a bug of some sort. The gamesim in demo playback should behave identically to when it was recorded in the first place. There is no way to tell if you're in demo playback and there never will be for this reason.

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Check if currently in a demo playback?

#3

Post by Vincent(PDP) » Sat Apr 11, 2015 2:20 pm

Well... The cvars are incremented via a clientside script, so...
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

User avatar
Vincent(PDP)
Forum Regular
Posts: 527
Joined: Thu Mar 14, 2013 7:35 pm
Location: Sweden
Clan: My DOOM site
Clan Tag: <MDS>
Contact:

RE: Check if currently in a demo playback?

#4

Post by Vincent(PDP) » Sat Apr 11, 2015 5:08 pm

@Dusk
This is indeed a bug. The clientside script is being activated once I kill someone, etc, in the demo and it increments the "real-time" cvars.
When checking the cvars later in a normal game they have changed. It doesn't matter which demo I look at.

I'll try to construct a demo wad and then create a ticket in the tracker.
Last edited by Vincent(PDP) on Sat Apr 11, 2015 5:10 pm, edited 1 time in total.
//Visual Vincent ( Vincent (PDP) )
- My DOOM site Team

My projects:
Spoiler: (Open)
Doom Writer
Escape From The Laboratory - Done
Escape From The Laboratory Part 2
Parkskolan Zombie Horde Map (ZM10) - Done
In game Admin Commands for Zandronum.
Achievement Mod for Zandronum
Stats mod

Post Reply