MantisBT - Zandronum
View Issue Details
0003769Zandronum[All Projects] Bugpublic2020-03-18 23:482020-03-29 19:19
sosleepy 
 
normalminoralways
needs testingopen 
Ubuntu x86_64Eoan
3.0 
 
0003769: Bots tries to jump to reach item when sv_nojump is true
WAD attached for easy reproduction of the issue. My guess is the issue can be easily solved by editing the ternary at line 464 in src/botpath.cpp to check the value of sv_nojump. I would appreciate if someone taught me how to have the current values of the server variables to try it myself.
No tags attached.
? testbot.wad (2,716) 2020-03-18 23:48
https://zandronum.com/tracker/file_download.php?file_id=2564&type=bug
Issue History
2020-03-18 23:48sosleepyNew Issue
2020-03-18 23:48sosleepyFile Added: testbot.wad
2020-03-24 22:10sosleepyNote Added: 0021232
2020-03-25 01:12sosleepyNote Added: 0021234
2020-03-25 19:00sosleepyNote Added: 0021238
2020-03-29 19:17Torr SamahoNote Added: 0021244
2020-03-29 19:18Torr SamahoAssigned To => Torr Samaho
2020-03-29 19:18Torr SamahoStatusnew => needs testing
2020-03-29 19:19Torr SamahoAssigned ToTorr Samaho =>

Notes
(0021232)
sosleepy   
2020-03-24 22:10   
Fixed, needs testing since this fix is fairly invasive.
https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/225/player-and-bots-shouldnt-attempt-to-jump/diff [^]
(0021234)
sosleepy   
2020-03-25 01:12   
Considering the locations this method is used, I would say it is a safe change.

$ grep -R CalcJumpHeight
src/botpath.cpp: fixed_t jumpheight = ( pActor->IsKindOf (RUNTIME_CLASS (APlayerPawn)) ) ? static_cast<APlayerPawn*>( pActor )->CalcJumpHeight( ) : 60;
src/d_player.h: fixed_t CalcJumpHeight( bool bAddStep = true );
src/p_user.cpp:fixed_t APlayerPawn::CalcJumpHeight( bool bAddStepZ )
(0021238)
sosleepy   
2020-03-25 19:00   
There might be a better way, from these notes:
https://zandronum.com/tracker/view.php?id=3775#c21236 [^]
https://zandronum.com/tracker/view.php?id=3775#c21237 [^]
The following values are relevant: BOTCMD_JUMP (59), BOTCMD_BEGINJUMPING (60), BOTCMD_STOPJUMPING (61).
(0021244)
Torr Samaho   
2020-03-29 19:17   
I added your patch.