View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0004108 | Zandronum | [All Projects] Bug | public | 2023-02-27 01:17 | 2023-03-19 21:55 |
|
Reporter | TDRR | |
Assigned To | | |
Priority | normal | Severity | trivial | Reproducibility | always |
Status | needs testing | Resolution | open | |
Platform | | OS | | OS Version | |
Product Version | 3.1 | |
Target Version | | Fixed in Version | | |
|
Summary | 0004108: Move bot pitch reset to StopAimingAtEnemy (patch) |
Description | Extremely simple patch to, as mentioned, move bot pitch resetting to only happen when the StopAimingAtEnemy command is run, instead of every tic. This goes well with the new BotScript commands, as it allows mods to control bot pitch from DECORATE/ACS, which greatly helps for more powerful and flexible interactions. |
|
Attached Files | botpitch.diff [^] (1,115 bytes) 2023-02-27 01:17 [Show Content] [Hide Content]# HG changeset patch
# User TDRR <srb2gamer@gmail.com>
# Date 1677460135 14400
# Sun Feb 26 21:08:55 2023 -0400
# Node ID 538840febcb88461d93a1f91f0d22d8a1537014a
# Parent 42c405796de6408c78638d2da135ff266ff4d028
Moved bot pitch reset to StopAimingAtEnemy command.
diff -r 42c405796de6 -r 538840febcb8 src/botcommands.cpp
--- a/src/botcommands.cpp Sun Feb 19 20:17:33 2023 +0000
+++ b/src/botcommands.cpp Sun Feb 26 21:08:55 2023 -0400
@@ -1773,6 +1773,10 @@
pBot->m_AngleDelta = 0;
pBot->m_AngleOffBy = 0;
pBot->m_AngleDesired = 0;
+
+ // [TDRR] Move pitch resetting to here, so custom bots can have
+ // their pitch changed with ACS (and because it makes more sense).
+ pBot->GetPlayer()->mo->pitch = 0;
}
//*****************************************************************************
diff -r 42c405796de6 -r 538840febcb8 src/bots.cpp
--- a/src/bots.cpp Sun Feb 19 20:17:33 2023 +0000
+++ b/src/bots.cpp Sun Feb 26 21:08:55 2023 -0400
@@ -3592,8 +3592,6 @@
}
}
}
- else
- m_pPlayer->mo->pitch = 0;
}
//*****************************************************************************
|
|