MantisBT - Zandronum
View Issue Details
0001105Zandronum[All Projects] Bugpublic2012-10-07 12:212018-09-30 22:23
Esum 
 
lowminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
1.0 
3.03.0 
0001105: Spectators move down when using the land command.
Spectators move down while using the land command.
This effect last 1~2 tics.
No tags attached.
Issue History
2012-10-07 12:21EsumNew Issue
2012-10-07 13:42unknownnaNote Added: 0005031
2012-10-07 18:05EsumNote Added: 0005042
2012-10-08 00:03unknownnaNote Added: 0005048
2012-10-08 00:03unknownnaStatusnew => confirmed
2012-10-08 10:26EsumNote Added: 0005050
2014-06-30 11:37EsumNote Added: 0009802
2014-06-30 11:38EsumNote Deleted: 0005050
2014-06-30 12:28EsumNote Edited: 0009802bug_revision_view_page.php?bugnote_id=9802#r5243
2014-07-04 11:22EsumNote Added: 0009833
2015-08-11 19:04cobaltStatusconfirmed => needs testing
2015-08-11 19:04cobaltTarget Version => 3.0
2015-08-11 19:04cobaltDescription Updatedbug_revision_view_page.php?rev_id=7903#r7903
2015-08-11 19:04cobaltNote Added: 0013211
2015-08-23 19:23Ru5tK1ngNote Added: 0013257
2015-08-23 20:31LeonardNote Added: 0013260
2015-08-25 10:34DuskStatusneeds testing => resolved
2015-08-25 10:34DuskFixed in Version => 3.0
2015-08-25 10:34DuskResolutionopen => fixed
2015-08-25 10:34DuskAssigned To => Dusk
2015-08-25 10:34DuskAssigned ToDusk =>
2015-08-25 10:34DuskDescription Updatedbug_revision_view_page.php?rev_id=7941#r7941
2018-09-30 22:23Blzut3Statusresolved => closed

Notes
(0005031)
unknownna   
2012-10-07 13:42   
Is the land command specific to Skulltag/Zandronum?
(0005042)
Esum   
2012-10-07 18:05   
The land command is not specific to Zandronum and exists in ZDoom. It interrupts flight and make the player who used it fall.
(0005048)
unknownna   
2012-10-08 00:03   
I see. I thought it was specific to Zandronum since it wouldn't respond when called from the console offline. Speaking of which, perhaps spectators should be allowed to use the land command properly.
(0009802)
Esum   
2014-06-30 11:37   
(edited on: 2014-06-30 12:28)
Here is the relevant part of the code:
Quote from p_user.cpp

3121 // Allow the spectator to do a few things, then break out.
3122 if ( player->bSpectating )
3123 {
... ...
3133 // Allow the player to fly around when a spectator.
3134 player->mo->flags |= MF_NOGRAVITY;
3135 player->mo->flags2 |= MF2_FLY;
... ...
3200 if ( cmd->ucmd.upmove == -32768 )
3201 { // Only land if in the air
3202 if ((player->mo->flags2 & MF2_FLY) && player->mo->waterlevel < 2)
3203 {
3204 player->mo->flags2 &= ~MF2_FLY;
3205 player->mo->flags &= ~MF_NOGRAVITY;
3206 }
3207 }
... ...
3225 // Done with spectator specific logic.
3226 return;
3227 }

If a spectator uses the land command he loses his ability to fly and becomes subject to gravity for one tick.
This issue is related to'http://zandronum.com/tracker/view.php?id=1641 [^]'

(0009833)
Esum   
2014-07-04 11:22   
Since spectators are not meant to interact with gravity I removed this here:'https://bitbucket.org/esum/zandronum-stable/commits/be5c0172b7e073a3ed21823becf6ad12e6d36b5b [^]'
(0013211)
cobalt   
2015-08-11 19:04   
Issue addressed by commit 381f296c9c7c: Changed: Spectators can now interact with gravity and use the fly/land commands (addresses 1641 and fixes 1105).
Committed by Leonard on Sunday 09 August 2015 19:48:32

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/c_cmds.cpp | 17 ++++++++++-
 src/cl_demo.cpp | 4 ++
 src/cl_demo.h | 1 +
 src/p_interaction.cpp | 11 ++++--
 src/p_user.cpp | 139 +++++++++++++++++++++-----------------------------------------------------------------
 6 files changed, 63 insertions(+), 110 deletions(-)

(0013257)
Ru5tK1ng   
2015-08-23 19:23   
Tested this with 3.0-alpha-150819-2351. The land command causes me to fall out of the sky and land on the ground with gravity in effect permantely. I have to use FLY to float around again. Not sure if this behavior is correct.
(0013260)
Leonard   
2015-08-23 20:31   
Yes that's what it's supposed to do.