MantisBT - Zandronum
View Issue Details
0003565Zandronum[All Projects] Suggestionpublic2018-11-01 11:462024-01-10 03:25
Fused 
Kaminsky 
normalminorhave not tried
resolvedfixed 
3.1-beta 
3.23.2 
0003565: cvar to disable spawnfog
Would it be possible to have a cvar to remove the spawnfog on joining players, without fully removing teleportfog?

Teleportfog is always spawned, and in my mod is very distracting when people join midgame and are SetDeadSpectator'd immediatley. My only solution now is to fully remove fog, which I don't find a good solution at all.
No tags attached.
txt TeleportFog.txt (549) 2018-11-03 15:28
https://zandronum.com/tracker/file_download.php?file_id=2438&type=bug
Issue History
2018-11-01 11:46FusedNew Issue
2018-11-03 15:28KaminskyFile Added: TeleportFog.txt
2018-11-03 15:31KaminskyNote Added: 0020170
2023-08-05 20:24FusedNote Added: 0022901
2023-08-06 04:03KaminskyStatusnew => closed
2023-08-06 04:03KaminskyResolutionopen => no change required
2023-12-06 11:39FusedNote Added: 0022929
2023-12-06 11:39FusedStatusclosed => feedback
2023-12-06 11:39FusedResolutionno change required => reopened
2023-12-18 14:41KaminskyNote Added: 0022935
2023-12-18 14:41KaminskyAssigned To => Kaminsky
2023-12-18 14:41KaminskyStatusfeedback => needs review
2023-12-18 14:41KaminskyTarget Version => 3.2
2023-12-29 18:59KaminskyNote Added: 0022939
2023-12-29 18:59KaminskyStatusneeds review => needs testing
2024-01-10 03:25Ru5tK1ngNote Added: 0022986
2024-01-10 03:25Ru5tK1ngStatusneeds testing => resolved
2024-01-10 03:25Ru5tK1ngResolutionreopened => fixed
2024-01-10 03:25Ru5tK1ngFixed in Version => 3.2

Notes
(0020170)
Kaminsky   
2018-11-03 15:31   
When an actor is spawned, the TeleportFog spawned with it doesn't have any target pointer assigned to it, but it will set its target to the actor if the actor is teleported.

What you can do is create a custom TeleportFog class which inherits and replaces the original one, then have it execute an ACS script upon spawning that checks if it has a target and removes it from the world if it doesn't.
(0022901)
Fused   
2023-08-05 20:24   
Sounds good, you can close this in my opinion since that suits my use case.
(0022929)
Fused   
2023-12-06 11:39   
I am reopening this issue because while this solution does work for regular teleport fog, it appears the target pointer is _not_ passed with functions such as `SetActorPosition`.
It would be nice to either have an option to just disable the spawn fog altogether so the main issue is fixed, or to have this git issue backported instead:'https://github.com/rheit/zdoom/pull/192 [^]'

The latter would allow the teleport fog to be temporarily disabled, and even allows modifying both the source and destination fog.
(0022935)
Kaminsky   
2023-12-18 14:41   
'https://foss.heptapod.net/zandronum/zandronum-stable/-/merge_requests/7 [^]'
(0022939)
Kaminsky   
2023-12-29 18:59   
This commit just got pushed in:'https://foss.heptapod.net/zandronum/zandronum-stable/-/commit/9e0f75dd49b90c0676ab3404c28bd3cec6bbcde5 [^]'

So now there's a DMFlag, "sv_nospawntelefog", that prevents spawn fog from appearing when a player spawns.
(0022986)
Ru5tK1ng   
2024-01-10 03:25   
Pulled the latest changes and the new DM flag works as intended and switches seamlessly on the fly between on and off. Teleport and morph fogs are not affected.