| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | // AIGame.cpp |
| 20 | // |
| 21 | #include <stdio.h> |
| 22 | #include <stdlib.h> |
| 23 | #include <string.h> |
| 24 | #include "osiris_import.h"cxx . . $ `<file>/scripts/osiris_import.h`/ |
| 25 | #include "osiris_common.h"cxx . . $ `<file>/scripts/osiris_common.h`/ |
| 26 | #include "osiris_vector.h"cxx . . $ `<file>/scripts/osiris_vector.h`/ |
| 27 | #include "DallasFuncs.cpp"cxx . . $ `<file>/scripts/DallasFuncs.cpp`/ |
| 28 | |
| 29 | #include "module.h"cxx . . $ `<file>/lib/module.h`/ |
| 30 | |
| 31 | #ifdef __cpluspluscxx . . $ `<built-in>:467:9`! |
| 32 | extern "C" { |
| 33 | #endif |
| 34 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! char STDCALLcxx . . $ `lib/module.h:88:11`! InitializeDLL(tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *func_list); |
| 35 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void STDCALLcxx . . $ `lib/module.h:88:11`! ShutdownDLL(void); |
| 36 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! int STDCALLcxx . . $ `lib/module.h:88:11`! GetGOScriptID(const char *name, uint8_tcxx . . $ uint8_t# isdoor); |
| 37 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void STDCALLPTRcxx . . $ `lib/module.h:90:10`! CreateInstance(int id); |
| 38 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! void STDCALLcxx . . $ `lib/module.h:88:11`! DestroyInstance(int id, void *ptr); |
| 39 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! int16_t STDCALLcxx . . $ `lib/module.h:88:11`! CallInstanceEvent(int id, void *ptr, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 40 | DLLEXPORTcxx . . $ `lib/module.h:114:9`! int STDCALLcxx . . $ `lib/module.h:88:11`! SaveRestoreState(void *file_ptr, uint8_tcxx . . $ uint8_t# saving_state); |
| 41 | #ifdef __cpluspluscxx . . $ `<built-in>:467:9`! |
| 42 | } |
| 43 | #endif |
| 44 | |
| 45 | static int String_table_sizecxx . . $ String_table_size. = 0; |
| 46 | static char **String_tablecxx . . $ String_table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 47 | static const char *_Error_stringcxx . . $ _Error_string. = "!!ERROR MISSING STRING!!"; |
| 48 | static const char *_Empty_stringcxx . . $ _Empty_string. = ""; |
| 49 | const char *GetStringFromTablecxx . . $ GetStringFromTable(f7ae7e56280f18ae).(int index) { |
| 50 | if ((index < 0) || (index >= String_table_sizecxx . . $ String_table_size.)) |
| 51 | return _Error_stringcxx . . $ _Error_string.; |
| 52 | if (!String_tablecxx . . $ String_table.[index]) |
| 53 | return _Empty_stringcxx . . $ _Empty_string.; |
| 54 | return String_tablecxx . . $ String_table.[index]; |
| 55 | } |
| 56 | #define TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(x) GetStringFromTable(x) |
| 57 | #define TXT_GBM_RENAMEcxx . . $ `scripts/AIGame.cpp:57:9`! 0 //"Rename GB Unit" |
| 58 | #define TXT_GBM_REPAIRcxx . . $ `scripts/AIGame.cpp:58:9`! 1 //"Repair GB" |
| 59 | #define TXT_GBM_EXITSHIPcxx . . $ `scripts/AIGame.cpp:59:9`! 2 //"Exit ship" |
| 60 | #define TXT_GBM_P0cxx . . $ `scripts/AIGame.cpp:60:9`! 3 //"P0" |
| 61 | #define TXT_GBM_P1cxx . . $ `scripts/AIGame.cpp:61:9`! 4 //"P1" |
| 62 | #define TXT_GBM_P2cxx . . $ `scripts/AIGame.cpp:62:9`! 5 //"P2" |
| 63 | #define TXT_GBM_P3cxx . . $ `scripts/AIGame.cpp:63:9`! 6 //"P3" |
| 64 | #define TXT_GBM_P4cxx . . $ `scripts/AIGame.cpp:64:9`! 7 //"P4" |
| 65 | #define TXT_GBM_P5cxx . . $ `scripts/AIGame.cpp:65:9`! 8 //"P5" |
| 66 | #define TXT_GBM_P6cxx . . $ `scripts/AIGame.cpp:66:9`! 9 //"P6" |
| 67 | #define TXT_GBM_P7cxx . . $ `scripts/AIGame.cpp:67:9`! 10 //"P7" |
| 68 | #define TXT_GBM_S0cxx . . $ `scripts/AIGame.cpp:68:9`! 11 //"S0" |
| 69 | #define TXT_GBM_S1cxx . . $ `scripts/AIGame.cpp:69:9`! 12 //"S1" |
| 70 | #define TXT_GBM_S2cxx . . $ `scripts/AIGame.cpp:70:9`! 13 //"S2" |
| 71 | #define TXT_GBM_S3cxx . . $ `scripts/AIGame.cpp:71:9`! 14 //"S3" |
| 72 | #define TXT_GBM_S4cxx . . $ `scripts/AIGame.cpp:72:9`! 15 //"S4" |
| 73 | #define TXT_GBM_S5cxx . . $ `scripts/AIGame.cpp:73:9`! 16 //"S5" |
| 74 | #define TXT_GBM_S6cxx . . $ `scripts/AIGame.cpp:74:9`! 17 //"S6" |
| 75 | #define TXT_GBM_S7cxx . . $ `scripts/AIGame.cpp:75:9`! 18 //"S7" |
| 76 | #define TXT_GBM_FINDPOWERUPScxx . . $ `scripts/AIGame.cpp:76:9`! 19 //"Find my powerups" |
| 77 | #define TXT_GBM_FINEPOWERUPcxx . . $ `scripts/AIGame.cpp:77:9`! 20 //"Find powerup" |
| 78 | #define TXT_GBM_FINDENERGYcxx . . $ `scripts/AIGame.cpp:78:9`! 21 //"Find energy" |
| 79 | #define TXT_GBM_FINDROBOTcxx . . $ `scripts/AIGame.cpp:79:9`! 22 //"Find robot" |
| 80 | #define TXT_GBM_FINDTHIEFcxx . . $ `scripts/AIGame.cpp:80:9`! 23 //"Find Thief" |
| 81 | #define TXT_GBM_FINDEXITcxx . . $ `scripts/AIGame.cpp:81:9`! 24 //"Find an exit to the mine" |
| 82 | #define TXT_GBM_FINDMINEcxx . . $ `scripts/AIGame.cpp:82:9`! 25 //"Find a mine" |
| 83 | #define TXT_GBM_FINDCMARKcxx . . $ `scripts/AIGame.cpp:83:9`! 26 //"Find closest marker" |
| 84 | #define TXT_GBM_M0cxx . . $ `scripts/AIGame.cpp:84:9`! 27 //"Find Marker 0" |
| 85 | #define TXT_GBM_M1cxx . . $ `scripts/AIGame.cpp:85:9`! 28 //"Find Marker 1" |
| 86 | #define TXT_GBM_M2cxx . . $ `scripts/AIGame.cpp:86:9`! 29 //"Find Marker 2" |
| 87 | #define TXT_GBM_M3cxx . . $ `scripts/AIGame.cpp:87:9`! 30 //"Find Marker 3" |
| 88 | #define TXT_GBM_M4cxx . . $ `scripts/AIGame.cpp:88:9`! 31 //"Find Marker 4" |
| 89 | #define TXT_GBM_M5cxx . . $ `scripts/AIGame.cpp:89:9`! 32 //"Find Marker 5" |
| 90 | #define TXT_GBM_M6cxx . . $ `scripts/AIGame.cpp:90:9`! 33 //"Find Marker 6" |
| 91 | #define TXT_GBM_M7cxx . . $ `scripts/AIGame.cpp:91:9`! 34 //"Find Marker 7" |
| 92 | #define TXT_GBM_ESCORTcxx . . $ `scripts/AIGame.cpp:92:9`! 35 //"Escort ship" |
| 93 | #define TXT_GBM_USEEXTINcxx . . $ `scripts/AIGame.cpp:93:9`! 36 //"Use fire extinguisher" |
| 94 | #define TXT_GBM_WINGNUTcxx . . $ `scripts/AIGame.cpp:94:9`! 37 //"Use Go Wingnut Powerup" |
| 95 | #define TXT_GBM_PILOTPOWERcxx . . $ `scripts/AIGame.cpp:95:9`! 38 //"Use Manual Pilot Powerup" |
| 96 | #define TXT_GBM_GUARDIANcxx . . $ `scripts/AIGame.cpp:96:9`! 39 //"Use Guardian Powerup" |
| 97 | #define TXT_GBM_ANTIVIRUScxx . . $ `scripts/AIGame.cpp:97:9`! 40 //"Use Anti-Virus Powerup" |
| 98 | #define TXT_GBM_ALLOWCHATcxx . . $ `scripts/AIGame.cpp:98:9`! 41 //"Allow GB chatter" |
| 99 | #define TXT_GBM_DISALLOWCHATcxx . . $ `scripts/AIGame.cpp:99:9`! 42 //"Disallow GB chatter" |
| 100 | #define TXT_GBM_RETURNTOSHIPcxx . . $ `scripts/AIGame.cpp:100:9`! 43 //"Return to ship |
| 101 | #define TXT_GB_ENTERINGSHIPcxx . . $ `scripts/AIGame.cpp:101:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(44) //"Entering ship!" |
| 102 | #define TXT_GB_HELPMSGcxx . . $ `scripts/AIGame.cpp:102:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(45) //"HELP! I am about to die..." |
| 103 | #define TXT_GB_NOTLOCATIONcxx . . $ `scripts/AIGame.cpp:103:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(46) //"This goal is not location based." |
| 104 | #define TXT_GB_NONAVcxx . . $ `scripts/AIGame.cpp:104:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(47) //"I do not have nav. data on this goal." |
| 105 | #define TXT_GB_ONMYWAYcxx . . $ `scripts/AIGame.cpp:105:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(48) //"On my way!" |
| 106 | #define TXT_GB_NOTREACHcxx . . $ `scripts/AIGame.cpp:106:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(49) //"The goal isn't currently reachable." |
| 107 | #define TXT_GB_ENTERSHIPcxx . . $ `scripts/AIGame.cpp:107:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(50) //"Returning to ship." |
| 108 | #define TXT_GB_ESCORTcxx . . $ `scripts/AIGame.cpp:108:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(51) //"Escorting ship..." |
| 109 | #define TXT_GB_FINDROBOTcxx . . $ `scripts/AIGame.cpp:109:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(52) //"Finding a robot." |
| 110 | #define TXT_GB_NOROBOTcxx . . $ `scripts/AIGame.cpp:110:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(53) //"No robots are reachable." |
| 111 | #define TXT_GB_FINDPOWERUPcxx . . $ `scripts/AIGame.cpp:111:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(54) //"Finding a powerup." |
| 112 | #define TXT_GB_NOPOWERUPcxx . . $ `scripts/AIGame.cpp:112:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(55) //"No powerups are reachable." |
| 113 | #define TXT_GB_GOMARKERcxx . . $ `scripts/AIGame.cpp:113:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(56) //"Going to the '%s' marker." |
| 114 | #define TXT_GB_NOMARKERcxx . . $ `scripts/AIGame.cpp:114:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(57) //"None of your markers are reachable." |
| 115 | #define TXT_GB_NOMARKcxx . . $ `scripts/AIGame.cpp:115:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(58) //"The marker is not reachable." |
| 116 | #define TXT_GB_FINDTHIEFcxx . . $ `scripts/AIGame.cpp:116:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(59) //"Finding the Thief." |
| 117 | #define TXT_GB_FOUNDTHIEFcxx . . $ `scripts/AIGame.cpp:117:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(60) //"Let's get him!" |
| 118 | #define TXT_GB_NOTHIEFcxx . . $ `scripts/AIGame.cpp:118:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(61) //"The Thief is not reachable." |
| 119 | #define TXT_GB_FINDPOWERUPScxx . . $ `scripts/AIGame.cpp:119:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(62) //"Finding your powerups." |
| 120 | #define TXT_GB_NOMESSAGEcxx . . $ `scripts/AIGame.cpp:120:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(63) //"No spew reachable." |
| 121 | #define TXT_GB_CHATOFFcxx . . $ `scripts/AIGame.cpp:121:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(64) //"Message Processor off." |
| 122 | #define TXT_GB_CHATONcxx . . $ `scripts/AIGame.cpp:122:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(65) //"Message Processor On." |
| 123 | #define TXT_GB_FINDENERGYcxx . . $ `scripts/AIGame.cpp:123:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(66) //"Finding energy." |
| 124 | #define TXT_GB_NOENERGYcxx . . $ `scripts/AIGame.cpp:124:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(67) //"No energy centers are reachable." |
| 125 | #define TXT_GB_REPAIREDcxx . . $ `scripts/AIGame.cpp:125:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(68) //"Repaired!" |
| 126 | #define TXT_GB_NOTENSHcxx . . $ `scripts/AIGame.cpp:126:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(69) //"NOt eNougH shIelDs to do rePAir..." |
| 127 | #define TXT_GB_NEWNAMEcxx . . $ `scripts/AIGame.cpp:127:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(70) //"Thank you for the new name!" |
| 128 | #define TXT_GB_NOWAYcxx . . $ `scripts/AIGame.cpp:128:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(71) //"No way!" |
| 129 | #define TXT_GB_STRIKEcxx . . $ `scripts/AIGame.cpp:129:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(72) //"I am on strike! I won't do task %d" |
| 130 | #define TXT_GB_MENUTITLEcxx . . $ `scripts/AIGame.cpp:130:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(73) //"GB Command Menu" |
| 131 | #define TXT_GB_FINDMARKMENUcxx . . $ `scripts/AIGame.cpp:131:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(74) //"Find marker: '%s'" |
| 132 | #define TXT_GB_GETTOcxx . . $ `scripts/AIGame.cpp:132:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(75) //"Get to %s" |
| 133 | #define TXT_GB_SHIELDAMOUNTcxx . . $ `scripts/AIGame.cpp:133:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(76) //" (%d shields)" |
| 134 | #define TXT_GB_ENTERNAMEcxx . . $ `scripts/AIGame.cpp:134:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(77) //"Enter GuideBot name:" |
| 135 | #define TXT_GBHIT1cxx . . $ `scripts/AIGame.cpp:135:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(78) //"Stop shooting me!" |
| 136 | #define TXT_GBHIT2cxx . . $ `scripts/AIGame.cpp:136:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(79) //"You hit me!" |
| 137 | #define TXT_GBHIT3cxx . . $ `scripts/AIGame.cpp:137:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(80) //"Stop it!" |
| 138 | #define TXT_GBHIT4cxx . . $ `scripts/AIGame.cpp:138:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(81) //"Im getting attacked!" |
| 139 | #define TXT_GBHIT5cxx . . $ `scripts/AIGame.cpp:139:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(82) //"Ouch!" |
| 140 | #define TXT_GBDAMAGEDcxx . . $ `scripts/AIGame.cpp:140:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(83) //"T?o Dama.xgf.ed to exit. NExfvD rEpair." |
| 141 | #define TXT_GB_OOPScxx . . $ `scripts/AIGame.cpp:141:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(84) //"Oops... Sorry about that!" |
| 142 | #define TXT_GB_SHOOTROBOTcxx . . $ `scripts/AIGame.cpp:142:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(85) //"Take that!" |
| 143 | #define TXT_GB_GOAL1cxx . . $ `scripts/AIGame.cpp:143:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(86) //"I am at the goal, coming back to get you." |
| 144 | #define TXT_GB_GOAL2cxx . . $ `scripts/AIGame.cpp:144:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(87) //"Come on!" |
| 145 | #define TXT_GB_GOAL3cxx . . $ `scripts/AIGame.cpp:145:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(88) //"Let's go!" |
| 146 | #define TXT_GB_COMINGBACKcxx . . $ `scripts/AIGame.cpp:146:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(89) //"I am coming back to get you." |
| 147 | #define TXT_THIEFSTEALcxx . . $ `scripts/AIGame.cpp:147:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(90) //"The thief stole your %s!" |
| 148 | #define TXT_THIEFSTEAL1cxx . . $ `scripts/AIGame.cpp:148:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(91) //"The thief stole a %s!" |
| 149 | #define TXT_THIEFSTEAL2cxx . . $ `scripts/AIGame.cpp:149:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(92) //"The thief stole %d of your %ss!" |
| 150 | #define TXT_GB_POWERUPcxx . . $ `scripts/AIGame.cpp:150:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(93) //"This powerup is for the GuideBot." |
| 151 | #define TXT_STHIEFSTEALcxx . . $ `scripts/AIGame.cpp:151:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(94) //"The Super Thief stole a %s!" |
| 152 | #define TXT_STHIEFSTEAL2cxx . . $ `scripts/AIGame.cpp:152:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(95) //"The Super Thief stole %d of your %ss!" |
| 153 | #define TXT_GBP_PUTOUTFIREcxx . . $ `scripts/AIGame.cpp:153:9`! 96 //"Putting out fires!" |
| 154 | #define TXT_GBP_COWABUNGAcxx . . $ `scripts/AIGame.cpp:154:9`! 97 //"Cowabunga!" |
| 155 | #define TXT_GBP_BEGENTALcxx . . $ `scripts/AIGame.cpp:155:9`! 98 //"Be gental..." |
| 156 | #define TXT_GBP_LETSDOITcxx . . $ `scripts/AIGame.cpp:156:9`! 99 //"Let's do it!" |
| 157 | #define TXT_GBP_CONVERTENcxx . . $ `scripts/AIGame.cpp:157:9`! 100 //"I will convert the infidal!" |
| 158 | #define TXT_GBP_ACCELERATORcxx . . $ `scripts/AIGame.cpp:158:9`! 101 //"Accelerator!!!!!!!" |
| 159 | #define TXT_GBPN_NOFIREcxx . . $ `scripts/AIGame.cpp:159:9`! 102 //"No fires to put out!" |
| 160 | #define TXT_GBPN_NOFIGHTcxx . . $ `scripts/AIGame.cpp:160:9`! 103 //"I don't want to fight!" |
| 161 | #define TXT_GBPN_GOPLAYcxx . . $ `scripts/AIGame.cpp:161:9`! 104 //"Go play with yourself..." |
| 162 | #define TXT_GBPN_TOODISSYcxx . . $ `scripts/AIGame.cpp:162:9`! 105 //"Too dissy..." |
| 163 | #define TXT_GBPN_NOENEMYcxx . . $ `scripts/AIGame.cpp:163:9`! 106 //"No enemies are near!" |
| 164 | #define TXT_GBPN_NOCOFFEEcxx . . $ `scripts/AIGame.cpp:164:9`! 107 //"I am sick of coffee..." |
| 165 | #define TXT_GBPP_EXTINcxx . . $ `scripts/AIGame.cpp:165:9`! 108 //"I got an extinguisher!" |
| 166 | #define TXT_GBPP_WINGNUTcxx . . $ `scripts/AIGame.cpp:166:9`! 109 //"I got the Wingnut Powerup! |
| 167 | #define TXT_GBPP_MANCONcxx . . $ `scripts/AIGame.cpp:167:9`! 110 //"I got the Manual Control Powerup!" |
| 168 | #define TXT_GBPP_GUARDcxx . . $ `scripts/AIGame.cpp:168:9`! 111 //"I got the Guardian Powerup!" |
| 169 | #define TXT_GBPP_ANTIVcxx . . $ `scripts/AIGame.cpp:169:9`! 112 //"I got a temporary Anti-Virus!" |
| 170 | #define TXT_GBPP_ACCELcxx . . $ `scripts/AIGame.cpp:170:9`! 113 //"I got the Accelerator!!!!!!" |
| 171 | #define TXT_WEAP_LASERScxx . . $ `scripts/AIGame.cpp:171:9`! 114 |
| 172 | #define TXT_WEAP_VAUSScxx . . $ `scripts/AIGame.cpp:172:9`! 115 |
| 173 | #define TXT_WEAP_MICROWAVEcxx . . $ `scripts/AIGame.cpp:173:9`! 116 |
| 174 | #define TXT_WEAP_PLASMAcxx . . $ `scripts/AIGame.cpp:174:9`! 117 |
| 175 | #define TXT_WEAP_FUSIONcxx . . $ `scripts/AIGame.cpp:175:9`! 118 |
| 176 | #define TXT_WEAP_SUPERcxx . . $ `scripts/AIGame.cpp:176:9`! 119 |
| 177 | #define TXT_WEAP_MASScxx . . $ `scripts/AIGame.cpp:177:9`! 120 |
| 178 | #define TXT_WEAP_NAPALMcxx . . $ `scripts/AIGame.cpp:178:9`! 121 |
| 179 | #define TXT_WEAP_EMDcxx . . $ `scripts/AIGame.cpp:179:9`! 122 |
| 180 | #define TXT_WEAP_OMEGAcxx . . $ `scripts/AIGame.cpp:180:9`! 123 |
| 181 | #define TXT_WEAP_CONCUSSIONcxx . . $ `scripts/AIGame.cpp:181:9`! 124 |
| 182 | #define TXT_WEAP_HOMINGcxx . . $ `scripts/AIGame.cpp:182:9`! 125 |
| 183 | #define TXT_WEAP_IMPACTcxx . . $ `scripts/AIGame.cpp:183:9`! 126 |
| 184 | #define TXT_WEAP_SMARTcxx . . $ `scripts/AIGame.cpp:184:9`! 127 |
| 185 | #define TXT_WEAP_MEGAcxx . . $ `scripts/AIGame.cpp:185:9`! 128 |
| 186 | #define TXT_WEAP_FRAGcxx . . $ `scripts/AIGame.cpp:186:9`! 129 |
| 187 | #define TXT_WEAP_GUIDEDcxx . . $ `scripts/AIGame.cpp:187:9`! 130 |
| 188 | #define TXT_WEAP_NAPALMRcxx . . $ `scripts/AIGame.cpp:188:9`! 131 |
| 189 | #define TXT_WEAP_CYCLONEcxx . . $ `scripts/AIGame.cpp:189:9`! 132 |
| 190 | #define TXT_WEAP_BLACKSHARKcxx . . $ `scripts/AIGame.cpp:190:9`! 133 |
| 191 | #define TXT_WEAP_AUTOMAPcxx . . $ `scripts/AIGame.cpp:191:9`! 134 |
| 192 | #define TXT_WEAP_HEADLIGHTcxx . . $ `scripts/AIGame.cpp:192:9`! 135 |
| 193 | #define TXT_WEAP_ETSCONVERTERcxx . . $ `scripts/AIGame.cpp:193:9`! 136 |
| 194 | #define TXT_WEAP_CLOAKcxx . . $ `scripts/AIGame.cpp:194:9`! 137 |
| 195 | #define TXT_WEAP_INVULNERABILITYcxx . . $ `scripts/AIGame.cpp:195:9`! 138 |
| 196 | #define TXT_WEAP_RAPIDFIREcxx . . $ `scripts/AIGame.cpp:196:9`! 139 |
| 197 | #define TXT_WEAP_QUADLASERScxx . . $ `scripts/AIGame.cpp:197:9`! 140 |
| 198 | #define TXT_GB_FIFTEEN_SEC_TO_GOcxx . . $ `scripts/AIGame.cpp:198:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(141) |
| 199 | #define TXT_GB_POW_DEPLETEDcxx . . $ `scripts/AIGame.cpp:199:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(142) |
| 200 | #define TXT_GB_POW_ACC_ALMOST_DONEcxx . . $ `scripts/AIGame.cpp:200:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(143) |
| 201 | #define TXT_GB_DONT_HAVE_POWERUPcxx . . $ `scripts/AIGame.cpp:201:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(144) |
| 202 | #define TXT_GB_I_FOUND_A_GB_POWERUPcxx . . $ `scripts/AIGame.cpp:202:9`! TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(145) |
| 203 | |
| 204 | // Returns the new child's handle |
| 205 | static int CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(int me, const char *child_name, uint8_tcxx . . $ uint8_t# child_type, char parent_ap, char child_ap, |
| 206 | bool f_aligned = true, bool f_set_parent = false); |
| 207 | |
| 208 | // Returns the new child's handle |
| 209 | int CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(int me, const char *child_name, uint8_tcxx . . $ uint8_t# child_type, char parent_ap, char child_ap, bool f_aligned, |
| 210 | bool f_set_parent) { |
| 211 | int child_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 212 | int child_id = Obj_FindIDcxx . . $ Obj_FindID.(child_name); |
| 213 | msafe_structcxx . . $ msafe_struct# m; |
| 214 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 215 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_POScxx . . $ `scripts/osiris_common.h:820:9`!, &m); |
| 216 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_ROOMNUMcxx . . $ `scripts/osiris_common.h:822:9`!, &m); |
| 217 | |
| 218 | if (child_id >= 0) { |
| 219 | int parent; |
| 220 | if (f_set_parent) |
| 221 | parent = me; |
| 222 | else |
| 223 | parent = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 224 | |
| 225 | child_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(child_type, child_id, m.roomnumcxx . . $ msafe_struct#roomnum., &m.poscxx . . $ msafe_struct#pos., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, parent); |
| 226 | if (child_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 227 | if (!Obj_AttachObjectAPcxx . . $ Obj_AttachObjectAP.(me, parent_ap, child_handle, child_ap, f_aligned)) { |
| 228 | // chrishack (we need a way to instantly kill scripted objects) |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | return child_handle; |
| 234 | } |
| 235 | |
| 236 | // ========================== |
| 237 | // Script class definitions// |
| 238 | // ========================== |
| 239 | #define NUM_IDScxx . . $ `scripts/AIGame.cpp:239:9`! 44 // maximum number of IDs |
| 240 | |
| 241 | #define ID_PESTcxx . . $ `scripts/AIGame.cpp:241:9`! 0 // Pest robot |
| 242 | #define ID_STINGERcxx . . $ `scripts/AIGame.cpp:242:9`! 1 // Stringer robot |
| 243 | #define ID_DRAGONcxx . . $ `scripts/AIGame.cpp:243:9`! 2 // Dragon |
| 244 | #define ID_TRACKERcxx . . $ `scripts/AIGame.cpp:244:9`! 3 // Tracker |
| 245 | #define ID_LANCEcxx . . $ `scripts/AIGame.cpp:245:9`! 4 // Lance |
| 246 | #define ID_FLAKcxx . . $ `scripts/AIGame.cpp:246:9`! 5 // Flak |
| 247 | #define ID_SUPERTROOPERcxx . . $ `scripts/AIGame.cpp:247:9`! 6 // Super Trooper |
| 248 | #define ID_REDSUPERTROOPERcxx . . $ `scripts/AIGame.cpp:248:9`! 7 // Red Super Trooper |
| 249 | #define ID_JUGGcxx . . $ `scripts/AIGame.cpp:249:9`! 8 // Juggernaut |
| 250 | #define ID_SIXGUNcxx . . $ `scripts/AIGame.cpp:250:9`! 9 // Sixgun |
| 251 | #define ID_SICKLEcxx . . $ `scripts/AIGame.cpp:251:9`! 10 // Sickle |
| 252 | #define ID_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:252:9`! 11 // GuideBot |
| 253 | #define ID_FIREATDISTcxx . . $ `scripts/AIGame.cpp:253:9`! 12 // Fire at distance |
| 254 | #define ID_TUBBScxx . . $ `scripts/AIGame.cpp:254:9`! 13 // Tubbs |
| 255 | #define ID_THIEFcxx . . $ `scripts/AIGame.cpp:255:9`! 14 // Thief :) |
| 256 | #define ID_GBPOWERUPcxx . . $ `scripts/AIGame.cpp:256:9`! 15 // GBPowerup |
| 257 | #define ID_BARNSWALLOWcxx . . $ `scripts/AIGame.cpp:257:9`! 16 // Barn Shallow |
| 258 | #define ID_SPARKYcxx . . $ `scripts/AIGame.cpp:258:9`! 17 |
| 259 | #define ID_MANTARAYcxx . . $ `scripts/AIGame.cpp:259:9`! 18 |
| 260 | #define ID_SPYHUNTERcxx . . $ `scripts/AIGame.cpp:260:9`! 19 |
| 261 | #define ID_SNIPERcxx . . $ `scripts/AIGame.cpp:261:9`! 20 |
| 262 | #define ID_HUMONCULOUScxx . . $ `scripts/AIGame.cpp:262:9`! 21 |
| 263 | #define ID_SEEKERcxx . . $ `scripts/AIGame.cpp:263:9`! 22 |
| 264 | #define ID_BETTYcxx . . $ `scripts/AIGame.cpp:264:9`! 23 |
| 265 | #define ID_CHAFFcxx . . $ `scripts/AIGame.cpp:265:9`! 24 |
| 266 | #define ID_CHAFFCHUNKcxx . . $ `scripts/AIGame.cpp:266:9`! 25 |
| 267 | #define ID_PROXMINEcxx . . $ `scripts/AIGame.cpp:267:9`! 26 |
| 268 | #define ID_BETTYBOMBcxx . . $ `scripts/AIGame.cpp:268:9`! 27 // parent of Bouncing Betty...created to make 3 Bettys |
| 269 | #define ID_JOSHBELLcxx . . $ `scripts/AIGame.cpp:269:9`! 28 |
| 270 | #define ID_SKIFFcxx . . $ `scripts/AIGame.cpp:270:9`! 29 |
| 271 | #define ID_EXPLODEONCONTACTcxx . . $ `scripts/AIGame.cpp:271:9`! 30 |
| 272 | #define ID_EXPLODETIMEOUTcxx . . $ `scripts/AIGame.cpp:272:9`! 31 |
| 273 | #define ID_GUNBOYcxx . . $ `scripts/AIGame.cpp:273:9`! 32 |
| 274 | #define ID_DEATH_TOWERcxx . . $ `scripts/AIGame.cpp:274:9`! 33 |
| 275 | #define ID_DEATH_COLLECTORcxx . . $ `scripts/AIGame.cpp:275:9`! 34 |
| 276 | #define ID_CHEMICAL_BALLcxx . . $ `scripts/AIGame.cpp:276:9`! 35 |
| 277 | #define ID_HELLIONcxx . . $ `scripts/AIGame.cpp:277:9`! 36 |
| 278 | #define ID_SUPERTHIEFcxx . . $ `scripts/AIGame.cpp:278:9`! 37 |
| 279 | #define ID_EVADERMODAcxx . . $ `scripts/AIGame.cpp:279:9`! 38 |
| 280 | #define ID_DESTROYONCONTACTcxx . . $ `scripts/AIGame.cpp:280:9`! 39 |
| 281 | #define ID_HATEPTMCcxx . . $ `scripts/AIGame.cpp:281:9`! 40 |
| 282 | #define ID_SNIPERNORUNcxx . . $ `scripts/AIGame.cpp:282:9`! 41 |
| 283 | #define ID_FLAMERAScxx . . $ `scripts/AIGame.cpp:283:9`! 42 |
| 284 | #define ID_OLDSCRATCHcxx . . $ `scripts/AIGame.cpp:284:9`! 43 |
| 285 | |
| 286 | struct tScriptInfocxx . . $ tScriptInfo# { |
| 287 | int idcxx . . $ tScriptInfo#id.; |
| 288 | const char *namecxx . . $ tScriptInfo#name.; |
| 289 | }; |
| 290 | |
| 291 | static tScriptInfocxx . . $ tScriptInfo# ScriptInfocxx . . $ ScriptInfo.[NUM_IDScxx . . $ `scripts/AIGame.cpp:239:9`!] = {{ID_PESTcxx . . $ `scripts/AIGame.cpp:241:9`!, "Pest"}, |
| 292 | {ID_STINGERcxx . . $ `scripts/AIGame.cpp:242:9`!, "Stinger"}, |
| 293 | {ID_DRAGONcxx . . $ `scripts/AIGame.cpp:243:9`!, "Dragontorso"}, |
| 294 | {ID_TRACKERcxx . . $ `scripts/AIGame.cpp:244:9`!, "Tracker"}, |
| 295 | {ID_LANCEcxx . . $ `scripts/AIGame.cpp:245:9`!, "Lance"}, |
| 296 | {ID_FLAKcxx . . $ `scripts/AIGame.cpp:246:9`!, "Flak"}, |
| 297 | {ID_SUPERTROOPERcxx . . $ `scripts/AIGame.cpp:247:9`!, "supertrooper"}, |
| 298 | {ID_REDSUPERTROOPERcxx . . $ `scripts/AIGame.cpp:248:9`!, "red supertrooper"}, |
| 299 | {ID_JUGGcxx . . $ `scripts/AIGame.cpp:249:9`!, "jugg"}, |
| 300 | {ID_SIXGUNcxx . . $ `scripts/AIGame.cpp:250:9`!, "Sixgun"}, |
| 301 | {ID_SICKLEcxx . . $ `scripts/AIGame.cpp:251:9`!, "Sickle"}, |
| 302 | {ID_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:252:9`!, "Guidebot"}, |
| 303 | {ID_FIREATDISTcxx . . $ `scripts/AIGame.cpp:253:9`!, "FireAtDist"}, |
| 304 | {ID_TUBBScxx . . $ `scripts/AIGame.cpp:254:9`!, "Tubbs"}, |
| 305 | {ID_THIEFcxx . . $ `scripts/AIGame.cpp:255:9`!, "Thief"}, |
| 306 | {ID_GBPOWERUPcxx . . $ `scripts/AIGame.cpp:256:9`!, "GBPowerup"}, |
| 307 | {ID_BARNSWALLOWcxx . . $ `scripts/AIGame.cpp:257:9`!, "BarnSwallow"}, |
| 308 | {ID_SPARKYcxx . . $ `scripts/AIGame.cpp:258:9`!, "Sparky"}, |
| 309 | {ID_MANTARAYcxx . . $ `scripts/AIGame.cpp:259:9`!, "Mantaray"}, |
| 310 | {ID_SPYHUNTERcxx . . $ `scripts/AIGame.cpp:260:9`!, "Spyhunter"}, |
| 311 | {ID_SNIPERcxx . . $ `scripts/AIGame.cpp:261:9`!, "Sniper"}, |
| 312 | {ID_HUMONCULOUScxx . . $ `scripts/AIGame.cpp:262:9`!, "Humonculous"}, |
| 313 | {ID_SEEKERcxx . . $ `scripts/AIGame.cpp:263:9`!, "Seeker"}, |
| 314 | {ID_BETTYcxx . . $ `scripts/AIGame.cpp:264:9`!, "Betty"}, |
| 315 | {ID_CHAFFcxx . . $ `scripts/AIGame.cpp:265:9`!, "ChaffBomb"}, |
| 316 | {ID_CHAFFCHUNKcxx . . $ `scripts/AIGame.cpp:266:9`!, "ChaffChunk"}, |
| 317 | {ID_PROXMINEcxx . . $ `scripts/AIGame.cpp:267:9`!, "ProxMine"}, |
| 318 | {ID_BETTYBOMBcxx . . $ `scripts/AIGame.cpp:268:9`!, "BettyBomb"}, |
| 319 | {ID_JOSHBELLcxx . . $ `scripts/AIGame.cpp:269:9`!, "JoshBell"}, |
| 320 | {ID_SKIFFcxx . . $ `scripts/AIGame.cpp:270:9`!, "Skiff"}, |
| 321 | {ID_EXPLODEONCONTACTcxx . . $ `scripts/AIGame.cpp:271:9`!, "ExplodeOnContact"}, |
| 322 | {ID_EXPLODETIMEOUTcxx . . $ `scripts/AIGame.cpp:272:9`!, "ExplodeTimeOut"}, |
| 323 | {ID_GUNBOYcxx . . $ `scripts/AIGame.cpp:273:9`!, "Gunboy"}, |
| 324 | {ID_DEATH_TOWERcxx . . $ `scripts/AIGame.cpp:274:9`!, "Ltowerbase"}, |
| 325 | {ID_DEATH_COLLECTORcxx . . $ `scripts/AIGame.cpp:275:9`!, "Collectorbase"}, |
| 326 | {ID_CHEMICAL_BALLcxx . . $ `scripts/AIGame.cpp:276:9`!, "ChemicalBall"}, |
| 327 | {ID_HELLIONcxx . . $ `scripts/AIGame.cpp:277:9`!, "Hellion"}, |
| 328 | {ID_SUPERTHIEFcxx . . $ `scripts/AIGame.cpp:278:9`!, "superthief"}, |
| 329 | {ID_EVADERMODAcxx . . $ `scripts/AIGame.cpp:279:9`!, "EvaderModA"}, |
| 330 | {ID_DESTROYONCONTACTcxx . . $ `scripts/AIGame.cpp:280:9`!, "DestroyOnContact"}, |
| 331 | {ID_HATEPTMCcxx . . $ `scripts/AIGame.cpp:281:9`!, "HatePTMC"}, |
| 332 | {ID_SNIPERNORUNcxx . . $ `scripts/AIGame.cpp:282:9`!, "SniperNoRun"}, |
| 333 | {ID_FLAMERAScxx . . $ `scripts/AIGame.cpp:283:9`!, "FlameRAS"}, |
| 334 | {ID_OLDSCRATCHcxx . . $ `scripts/AIGame.cpp:284:9`!, "old scratch"}}; |
| 335 | |
| 336 | static int aigame_mod_idcxx . . $ aigame_mod_id.; |
| 337 | // use this macro to create unique timer IDs |
| 338 | #define CREATE_TIMER_IDcxx . . $ `scripts/AIGame.cpp:338:9`!(id) ((aigame_mod_id << 16) | (id)) |
| 339 | |
| 340 | static int GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(int object); |
| 341 | static int GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(int object); |
| 342 | |
| 343 | class BaseObjScriptcxx . . $ BaseObjScript# { |
| 344 | public: |
| 345 | BaseObjScriptcxx . . $ BaseObjScript#BaseObjScript(49f6e7a06ebc5aa8).(); |
| 346 | ~cxx . . $ BaseObjScript#`~BaseObjScript`(ced63f7c635d850d).BaseObjScriptcxx . . $ BaseObjScript#(); |
| 347 | virtual int16_t CallEventcxx . . $ BaseObjScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 348 | }; |
| 349 | |
| 350 | struct tShieldOrbInfocxx . . $ tShieldOrbInfo# { |
| 351 | int hitcountcxx . . $ tShieldOrbInfo#hitcount.; |
| 352 | }; |
| 353 | |
| 354 | //------------------ |
| 355 | // Pest class |
| 356 | //------------------ |
| 357 | struct pest_datacxx . . $ pest_data# { |
| 358 | int tail_handlecxx . . $ pest_data#tail_handle.; |
| 359 | float last_anim_framecxx . . $ pest_data#last_anim_frame.; |
| 360 | int foot_soundscxx . . $ pest_data#foot_sounds.[3]; |
| 361 | }; |
| 362 | |
| 363 | class Pestcxx . . $ Pest# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 364 | private: |
| 365 | pest_datacxx . . $ pest_data# *memorycxx . . $ Pest#memory.; |
| 366 | void DoInitcxx . . $ Pest#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 367 | |
| 368 | public: |
| 369 | Pestcxx . . $ Pest#Pest(49f6e7a06ebc5aa8).() {} |
| 370 | int16_t CallEventcxx . . $ Pest#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 371 | }; |
| 372 | |
| 373 | //------------------ |
| 374 | // Stinger class |
| 375 | //------------------ |
| 376 | #define STINGER_RANGEDcxx . . $ `scripts/AIGame.cpp:376:9`! 0 |
| 377 | #define STINGER_MELEEcxx . . $ `scripts/AIGame.cpp:377:9`! 1 |
| 378 | |
| 379 | struct stinger_datacxx . . $ stinger_data# { |
| 380 | float next_mode_timecxx . . $ stinger_data#next_mode_time.; |
| 381 | float force_melee_shieldscxx . . $ stinger_data#force_melee_shields.; |
| 382 | char modecxx . . $ stinger_data#mode.; |
| 383 | char f_very_hurtcxx . . $ stinger_data#f_very_hurt.; |
| 384 | }; |
| 385 | |
| 386 | class Stingercxx . . $ Stinger# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 387 | private: |
| 388 | stinger_datacxx . . $ stinger_data# *memorycxx . . $ Stinger#memory.; |
| 389 | |
| 390 | void DoInitcxx . . $ Stinger#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 391 | void DoIntervalcxx . . $ Stinger#DoInterval(d4f767463ce0a6b3).(int me_handle); |
| 392 | |
| 393 | public: |
| 394 | Stingercxx . . $ Stinger#Stinger(49f6e7a06ebc5aa8).() { memorycxx . . $ Stinger#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 395 | int16_t CallEventcxx . . $ Stinger#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 396 | }; |
| 397 | |
| 398 | //------------------ |
| 399 | // SuperThief class |
| 400 | //------------------ |
| 401 | |
| 402 | #define MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`! 25 |
| 403 | |
| 404 | struct weapon_itemcxx . . $ weapon_item# { |
| 405 | char indexcxx . . $ weapon_item#index.; |
| 406 | int ownercxx . . $ weapon_item#owner.; |
| 407 | char amountcxx . . $ weapon_item#amount.; |
| 408 | }; |
| 409 | |
| 410 | #define SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`! 0 |
| 411 | #define SUPERTHIEF_MELEEcxx . . $ `scripts/AIGame.cpp:411:9`! 1 |
| 412 | #define SUPERTHIEF_DEATHcxx . . $ `scripts/AIGame.cpp:412:9`! 2 |
| 413 | #define SUPERTHIEF_WAITcxx . . $ `scripts/AIGame.cpp:413:9`! 3 |
| 414 | #define SUPERTHIEF_INTROcxx . . $ `scripts/AIGame.cpp:414:9`! 4 |
| 415 | |
| 416 | struct superthief_datacxx . . $ superthief_data# { |
| 417 | float mode_timecxx . . $ superthief_data#mode_time.; |
| 418 | |
| 419 | float next_mode_timecxx . . $ superthief_data#next_mode_time.; |
| 420 | float force_ranged_shieldscxx . . $ superthief_data#force_ranged_shields.; |
| 421 | char modecxx . . $ superthief_data#mode.; |
| 422 | char f_very_hurtcxx . . $ superthief_data#f_very_hurt.; |
| 423 | |
| 424 | float last_framecxx . . $ superthief_data#last_frame.; |
| 425 | float time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary.; |
| 426 | |
| 427 | int cur_weaponcxx . . $ superthief_data#cur_weapon.; |
| 428 | |
| 429 | int num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.; |
| 430 | weapon_itemcxx . . $ weapon_item# stolen_weaponscxx . . $ superthief_data#stolen_weapons.[MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`!]; |
| 431 | |
| 432 | char weaponcxx . . $ superthief_data#weapon.[100]; |
| 433 | char soundcxx . . $ superthief_data#sound.[100]; |
| 434 | float latencycxx . . $ superthief_data#latency.; |
| 435 | |
| 436 | float next_fire_flare_timecxx . . $ superthief_data#next_fire_flare_time.; |
| 437 | int flare_fire_indexcxx . . $ superthief_data#flare_fire_index.; |
| 438 | |
| 439 | int camera_objcxx . . $ superthief_data#camera_obj.; |
| 440 | int laser_objcxx . . $ superthief_data#laser_obj.; |
| 441 | |
| 442 | bool laser_oncxx . . $ superthief_data#laser_on.; |
| 443 | }; |
| 444 | |
| 445 | class SuperThiefcxx . . $ SuperThief# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 446 | private: |
| 447 | superthief_datacxx . . $ superthief_data# *memorycxx . . $ SuperThief#memory.; |
| 448 | |
| 449 | bool DoStealcxx . . $ SuperThief#DoSteal(cf9ef193275fa6d8).(int me, int it); |
| 450 | void SpewEverythingcxx . . $ SuperThief#SpewEverything(d4f767463ce0a6b3).(int me); |
| 451 | bool DoNotifycxx . . $ SuperThief#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 452 | |
| 453 | void SetModecxx . . $ SuperThief#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 454 | void CheckAndFireSecondarycxx . . $ SuperThief#CheckAndFireSecondary(d4f767463ce0a6b3).(int me); |
| 455 | |
| 456 | void FireFlarecxx . . $ SuperThief#FireFlare(d4f767463ce0a6b3).(int me); |
| 457 | |
| 458 | void DoInitcxx . . $ SuperThief#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 459 | void DoIntervalcxx . . $ SuperThief#DoInterval(d4f767463ce0a6b3).(int me_handle); |
| 460 | |
| 461 | public: |
| 462 | SuperThiefcxx . . $ SuperThief#SuperThief(49f6e7a06ebc5aa8).() { memorycxx . . $ SuperThief#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 463 | int16_t CallEventcxx . . $ SuperThief#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 464 | }; |
| 465 | |
| 466 | //------------------ |
| 467 | // Humonculous class |
| 468 | //------------------ |
| 469 | |
| 470 | struct humonculous_datacxx . . $ humonculous_data# { |
| 471 | float next_wall_hit_check_timecxx . . $ humonculous_data#next_wall_hit_check_time.; |
| 472 | float mode_timecxx . . $ humonculous_data#mode_time.; |
| 473 | |
| 474 | float force_mid_damage_shieldscxx . . $ humonculous_data#force_mid_damage_shields.; |
| 475 | float force_wall_hit_shieldscxx . . $ humonculous_data#force_wall_hit_shields.; |
| 476 | float force_melee_shieldscxx . . $ humonculous_data#force_melee_shields.; |
| 477 | |
| 478 | float last_shieldscxx . . $ humonculous_data#last_shields.; |
| 479 | |
| 480 | uint16_tcxx . . $ uint16_t# modecxx . . $ humonculous_data#mode.; |
| 481 | uint16_tcxx . . $ uint16_t# next_modecxx . . $ humonculous_data#next_mode.; |
| 482 | |
| 483 | vectorcxx . . $ vector# land_poscxx . . $ humonculous_data#land_pos.; |
| 484 | vectorcxx . . $ vector# land_fveccxx . . $ humonculous_data#land_fvec.; |
| 485 | // Note: land_uvec is always {0.0, 1.0, 0.0} |
| 486 | |
| 487 | float ground_pnt_offsetcxx . . $ humonculous_data#ground_pnt_offset.; // This can be computed at start of level |
| 488 | |
| 489 | float max_speedcxx . . $ humonculous_data#max_speed.; |
| 490 | float max_delta_speedcxx . . $ humonculous_data#max_delta_speed.; |
| 491 | |
| 492 | float next_mode_timecxx . . $ humonculous_data#next_mode_time.; |
| 493 | |
| 494 | int joshcxx . . $ humonculous_data#josh.[2]; |
| 495 | |
| 496 | int rockscxx . . $ humonculous_data#rocks.[5]; |
| 497 | |
| 498 | int16_t flagscxx . . $ humonculous_data#flags.; |
| 499 | }; |
| 500 | |
| 501 | class Humonculouscxx . . $ Humonculous# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 502 | private: |
| 503 | humonculous_datacxx . . $ humonculous_data# *memorycxx . . $ Humonculous#memory.; |
| 504 | |
| 505 | void DetermineDeathPoscxx . . $ Humonculous#DetermineDeathPos(3b84d284e8efb0f0).(int me, vectorcxx . . $ vector# *dpos, int *droom); |
| 506 | bool SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(int me, uint16_tcxx . . $ uint16_t# mode); |
| 507 | void DoInitcxx . . $ Humonculous#DoInit(d4f767463ce0a6b3).(int me); |
| 508 | void DoIntervalcxx . . $ Humonculous#DoInterval(d4f767463ce0a6b3).(int me); |
| 509 | bool DoNotifycxx . . $ Humonculous#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 510 | |
| 511 | public: |
| 512 | Humonculouscxx . . $ Humonculous#Humonculous(49f6e7a06ebc5aa8).() { memorycxx . . $ Humonculous#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 513 | int16_t CallEventcxx . . $ Humonculous#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 514 | }; |
| 515 | |
| 516 | //------------------ |
| 517 | // Dragon class |
| 518 | //------------------ |
| 519 | #define DRAGON_ARMORcxx . . $ `scripts/AIGame.cpp:519:9`! 0 |
| 520 | #define DRAGON_SKELETONcxx . . $ `scripts/AIGame.cpp:520:9`! 1 |
| 521 | |
| 522 | struct dragon_datacxx . . $ dragon_data# { |
| 523 | int modecxx . . $ dragon_data#mode.; |
| 524 | int head_objectcxx . . $ dragon_data#head_object.; |
| 525 | int tail_objectcxx . . $ dragon_data#tail_object.; |
| 526 | int green_turretcxx . . $ dragon_data#green_turret.; |
| 527 | int tcxx . . $ dragon_data#t.[6]; |
| 528 | int tentaclecxx . . $ dragon_data#tentacle.[6]; |
| 529 | }; |
| 530 | |
| 531 | class Dragoncxx . . $ Dragon# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 532 | private: |
| 533 | dragon_datacxx . . $ dragon_data# *memorycxx . . $ Dragon#memory.; |
| 534 | |
| 535 | void DoInitcxx . . $ Dragon#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 536 | |
| 537 | public: |
| 538 | Dragoncxx . . $ Dragon#Dragon(49f6e7a06ebc5aa8).() { memorycxx . . $ Dragon#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 539 | int16_t CallEventcxx . . $ Dragon#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 540 | }; |
| 541 | |
| 542 | //---------------- |
| 543 | // Tracker |
| 544 | //---------------- |
| 545 | |
| 546 | struct tracker_datacxx . . $ tracker_data# { |
| 547 | int turret_objectcxx . . $ tracker_data#turret_object.; |
| 548 | int hatch_objectcxx . . $ tracker_data#hatch_object.; |
| 549 | }; |
| 550 | |
| 551 | class Trackercxx . . $ Tracker# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 552 | private: |
| 553 | tracker_datacxx . . $ tracker_data# *memorycxx . . $ Tracker#memory.; |
| 554 | |
| 555 | void DoInitcxx . . $ Tracker#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 556 | |
| 557 | public: |
| 558 | Trackercxx . . $ Tracker#Tracker(49f6e7a06ebc5aa8).() { memorycxx . . $ Tracker#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 559 | int16_t CallEventcxx . . $ Tracker#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 560 | }; |
| 561 | |
| 562 | //------------------ |
| 563 | // Lance class |
| 564 | //------------------ |
| 565 | |
| 566 | #define LANCE_PAUSEDcxx . . $ `scripts/AIGame.cpp:566:9`! 0 |
| 567 | #define LANCE_MOVINGcxx . . $ `scripts/AIGame.cpp:567:9`! 1 |
| 568 | |
| 569 | struct lance_datacxx . . $ lance_data# { |
| 570 | int modecxx . . $ lance_data#mode.; |
| 571 | }; |
| 572 | |
| 573 | class Lancecxx . . $ Lance# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 574 | private: |
| 575 | void DoInitcxx . . $ Lance#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 576 | void DoFramecxx . . $ Lance#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 577 | lance_datacxx . . $ lance_data# *memorycxx . . $ Lance#memory.; |
| 578 | |
| 579 | public: |
| 580 | Lancecxx . . $ Lance#Lance(49f6e7a06ebc5aa8).() {} |
| 581 | int16_t CallEventcxx . . $ Lance#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 582 | }; |
| 583 | |
| 584 | //------------------ |
| 585 | // Flak class |
| 586 | //------------------ |
| 587 | struct flak_datacxx . . $ flak_data# { |
| 588 | int canopy_handlecxx . . $ flak_data#canopy_handle.; |
| 589 | bool f_deadcxx . . $ flak_data#f_dead.; |
| 590 | float death_timecxx . . $ flak_data#death_time.; |
| 591 | }; |
| 592 | |
| 593 | class Flakcxx . . $ Flak# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 594 | private: |
| 595 | flak_datacxx . . $ flak_data# *memorycxx . . $ Flak#memory.; |
| 596 | void DoInitcxx . . $ Flak#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 597 | |
| 598 | public: |
| 599 | Flakcxx . . $ Flak#Flak(49f6e7a06ebc5aa8).() {} |
| 600 | int16_t CallEventcxx . . $ Flak#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 601 | }; |
| 602 | |
| 603 | //------------------ |
| 604 | // Seeker class |
| 605 | //------------------ |
| 606 | |
| 607 | class Seekercxx . . $ Seeker# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 608 | private: |
| 609 | void DoInitcxx . . $ Seeker#DoInit(d4f767463ce0a6b3).(int me); |
| 610 | void DoCollidecxx . . $ Seeker#DoCollide(d4f767463ce0a6b3).(int me); |
| 611 | |
| 612 | public: |
| 613 | Seekercxx . . $ Seeker#Seeker(49f6e7a06ebc5aa8).() {} |
| 614 | int16_t CallEventcxx . . $ Seeker#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 615 | }; |
| 616 | |
| 617 | //------------------ |
| 618 | // SuperTrooper class |
| 619 | //------------------ |
| 620 | |
| 621 | struct supertrooper_datacxx . . $ supertrooper_data# { |
| 622 | int body_handlecxx . . $ supertrooper_data#body_handle.; |
| 623 | }; |
| 624 | |
| 625 | class SuperTroopercxx . . $ SuperTrooper# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 626 | private: |
| 627 | supertrooper_datacxx . . $ supertrooper_data# *memorycxx . . $ SuperTrooper#memory.; |
| 628 | void DoInitcxx . . $ SuperTrooper#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 629 | |
| 630 | public: |
| 631 | SuperTroopercxx . . $ SuperTrooper#SuperTrooper(49f6e7a06ebc5aa8).() {} |
| 632 | int16_t CallEventcxx . . $ SuperTrooper#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 633 | }; |
| 634 | |
| 635 | //------------------ |
| 636 | // Sparky class |
| 637 | //------------------ |
| 638 | |
| 639 | #define MALF_TIMEcxx . . $ `scripts/AIGame.cpp:639:9`! 5.0f |
| 640 | #define MIN_MALF_SPEEDcxx . . $ `scripts/AIGame.cpp:640:9`! 6000.0f |
| 641 | |
| 642 | #define DEATH_TIMEcxx . . $ `scripts/AIGame.cpp:642:9`! 5.0f |
| 643 | #define DEATH_ROT_ACCcxx . . $ `scripts/AIGame.cpp:643:9`! 50000.0f |
| 644 | |
| 645 | #define SPARKY_NO_ROTcxx . . $ `scripts/AIGame.cpp:645:9`! 0 |
| 646 | #define SPARKY_ROT_LEFTcxx . . $ `scripts/AIGame.cpp:646:9`! 1 |
| 647 | #define SPARKY_ROT_RIGHTcxx . . $ `scripts/AIGame.cpp:647:9`! 2 |
| 648 | |
| 649 | #define SPARKY_NORMALcxx . . $ `scripts/AIGame.cpp:649:9`! 0 |
| 650 | #define SPARKY_DYINGcxx . . $ `scripts/AIGame.cpp:650:9`! 1 |
| 651 | |
| 652 | struct sparky_datacxx . . $ sparky_data# { |
| 653 | char modecxx . . $ sparky_data#mode.; |
| 654 | float mode_timecxx . . $ sparky_data#mode_time.; |
| 655 | bool f_rotation_death_enabledcxx . . $ sparky_data#f_rotation_death_enabled.; |
| 656 | float dragcxx . . $ sparky_data#drag.; |
| 657 | |
| 658 | float last_spark_timecxx . . $ sparky_data#last_spark_time.; |
| 659 | |
| 660 | int matcen_idcxx . . $ sparky_data#matcen_id.; |
| 661 | |
| 662 | matrixcxx . . $ matrix# orientcxx . . $ sparky_data#orient.; |
| 663 | |
| 664 | char spin_dircxx . . $ sparky_data#spin_dir.; |
| 665 | float spin_timecxx . . $ sparky_data#spin_time.; |
| 666 | }; |
| 667 | |
| 668 | class Sparkycxx . . $ Sparky# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 669 | private: |
| 670 | sparky_datacxx . . $ sparky_data# *memorycxx . . $ Sparky#memory.; |
| 671 | void DoInitcxx . . $ Sparky#DoInit(d4f767463ce0a6b3).(int me); |
| 672 | void DoFramecxx . . $ Sparky#DoFrame(d4f767463ce0a6b3).(int me); |
| 673 | bool DoNotifycxx . . $ Sparky#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 674 | void SetModecxx . . $ Sparky#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 675 | |
| 676 | public: |
| 677 | Sparkycxx . . $ Sparky#Sparky(49f6e7a06ebc5aa8).() {} |
| 678 | int16_t CallEventcxx . . $ Sparky#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 679 | }; |
| 680 | |
| 681 | //------------------ |
| 682 | // Hellion class |
| 683 | //------------------ |
| 684 | |
| 685 | #define HELLION_WAITcxx . . $ `scripts/AIGame.cpp:685:9`! 0 |
| 686 | #define HELLION_INTROcxx . . $ `scripts/AIGame.cpp:686:9`! 1 |
| 687 | #define HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`! 2 |
| 688 | #define HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`! 3 |
| 689 | #define HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`! 4 |
| 690 | #define HELLION_SLEEPcxx . . $ `scripts/AIGame.cpp:690:9`! 5 |
| 691 | #define HELLION_BIRTHINGcxx . . $ `scripts/AIGame.cpp:691:9`! 6 |
| 692 | #define HELLION_DEATHcxx . . $ `scripts/AIGame.cpp:692:9`! 7 |
| 693 | #define HELLION_BETWEEN_MODEcxx . . $ `scripts/AIGame.cpp:693:9`! 8 |
| 694 | |
| 695 | struct hellion_datacxx . . $ hellion_data# { |
| 696 | int flagscxx . . $ hellion_data#flags.; |
| 697 | char modecxx . . $ hellion_data#mode.; |
| 698 | char next_modecxx . . $ hellion_data#next_mode.; |
| 699 | float mode_timecxx . . $ hellion_data#mode_time.; |
| 700 | int head_objectcxx . . $ hellion_data#head_object.; |
| 701 | int turret_objectcxx . . $ hellion_data#turret_object.; |
| 702 | |
| 703 | float last_framecxx . . $ hellion_data#last_frame.; |
| 704 | |
| 705 | int laser_soundcxx . . $ hellion_data#laser_sound.; |
| 706 | |
| 707 | // Save and restore information |
| 708 | char weaponcxx . . $ hellion_data#weapon.[100]; |
| 709 | char soundcxx . . $ hellion_data#sound.[100]; |
| 710 | float startcxx . . $ hellion_data#start.; |
| 711 | float firecxx . . $ hellion_data#fire.; |
| 712 | float endcxx . . $ hellion_data#end.; |
| 713 | float timecxx . . $ hellion_data#time.; |
| 714 | float latencycxx . . $ hellion_data#latency.; |
| 715 | int indexcxx . . $ hellion_data#index.; |
| 716 | char f_maskcxx . . $ hellion_data#f_mask.; |
| 717 | |
| 718 | float alert_startcxx . . $ hellion_data#alert_start.; |
| 719 | float alert_endcxx . . $ hellion_data#alert_end.; |
| 720 | float alert_timecxx . . $ hellion_data#alert_time.; |
| 721 | // End of save and restore information |
| 722 | |
| 723 | float laser_time_leftcxx . . $ hellion_data#laser_time_left.; |
| 724 | int emittercxx . . $ hellion_data#emitter.[2]; |
| 725 | int cameracxx . . $ hellion_data#camera.[2]; |
| 726 | }; |
| 727 | |
| 728 | class Hellioncxx . . $ Hellion# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 729 | private: |
| 730 | hellion_datacxx . . $ hellion_data# *memorycxx . . $ Hellion#memory.; |
| 731 | void DoInitcxx . . $ Hellion#DoInit(d4f767463ce0a6b3).(int me); |
| 732 | void RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(int me, float start, float end, float time); |
| 733 | void RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(int me, float start, float fire, int fire_sound, float end, float time, float latency, int index, |
| 734 | uint16_tcxx . . $ uint16_t# w_id, char f_mask); |
| 735 | void DoFramecxx . . $ Hellion#DoFrame(d4f767463ce0a6b3).(int me); |
| 736 | bool DoNotifycxx . . $ Hellion#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 737 | void SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 738 | |
| 739 | public: |
| 740 | Hellioncxx . . $ Hellion#Hellion(49f6e7a06ebc5aa8).() {} |
| 741 | int16_t CallEventcxx . . $ Hellion#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 742 | }; |
| 743 | |
| 744 | //------------------ |
| 745 | // MantaRay class |
| 746 | //------------------ |
| 747 | |
| 748 | // Modes |
| 749 | #define MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`! 0 |
| 750 | #define MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`! 1 |
| 751 | #define MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`! 2 |
| 752 | |
| 753 | // Flags |
| 754 | #define MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`! 0x01 |
| 755 | #define MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`! 0x02 |
| 756 | #define MRF_CATCHUPcxx . . $ `scripts/AIGame.cpp:756:9`! 0x04 |
| 757 | |
| 758 | // Squad commands |
| 759 | #define MRC_JOIN_MEcxx . . $ `scripts/AIGame.cpp:759:9`! 11 |
| 760 | #define MRC_LEAVE_YOUcxx . . $ `scripts/AIGame.cpp:760:9`! 12 |
| 761 | #define MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`! 13 |
| 762 | #define MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`! 14 |
| 763 | #define MRC_GET_GOAL_ORIENTcxx . . $ `scripts/AIGame.cpp:763:9`! 15 |
| 764 | |
| 765 | #define MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`! 4 |
| 766 | |
| 767 | // Squad offsets |
| 768 | #define MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`! 10.0f |
| 769 | #define MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`! 20.0f |
| 770 | #define MRO_UVECcxx . . $ `scripts/AIGame.cpp:770:9`! 5.0f |
| 771 | |
| 772 | // Squad catchup offset |
| 773 | #define MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`! 5.0f |
| 774 | |
| 775 | struct mantaray_datacxx . . $ mantaray_data# { |
| 776 | char modecxx . . $ mantaray_data#mode.; |
| 777 | float mode_timecxx . . $ mantaray_data#mode_time.; |
| 778 | float next_mode_timecxx . . $ mantaray_data#next_mode_time.; |
| 779 | |
| 780 | float base_speedcxx . . $ mantaray_data#base_speed.; // We alter this when we are in catchup mode |
| 781 | float attack_speedcxx . . $ mantaray_data#attack_speed.; |
| 782 | |
| 783 | int flagscxx . . $ mantaray_data#flags.; |
| 784 | |
| 785 | uint16_tcxx . . $ uint16_t# mantaray_idcxx . . $ mantaray_data#mantaray_id.; |
| 786 | |
| 787 | int leader_handlecxx . . $ mantaray_data#leader_handle.; |
| 788 | int num_teammatescxx . . $ mantaray_data#num_teammates.; |
| 789 | int teammatecxx . . $ mantaray_data#teammate.[MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!]; |
| 790 | float next_update_squad_timecxx . . $ mantaray_data#next_update_squad_time.; |
| 791 | |
| 792 | vectorcxx . . $ vector# goal_poscxx . . $ mantaray_data#goal_pos.; |
| 793 | int goal_roomcxx . . $ mantaray_data#goal_room.; |
| 794 | |
| 795 | }; |
| 796 | |
| 797 | class MantaRaycxx . . $ MantaRay# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 798 | private: |
| 799 | mantaray_datacxx . . $ mantaray_data# *memorycxx . . $ MantaRay#memory.; |
| 800 | void DoInitcxx . . $ MantaRay#DoInit(d4f767463ce0a6b3).(int me); |
| 801 | |
| 802 | void DoSquadieFramecxx . . $ MantaRay#DoSquadieFrame(d4f767463ce0a6b3).(int me); |
| 803 | void DoFramecxx . . $ MantaRay#DoFrame(d4f767463ce0a6b3).(int me); |
| 804 | void SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 805 | bool DoNotifycxx . . $ MantaRay#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 806 | |
| 807 | bool SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr); |
| 808 | bool ReceiveCommandcxx . . $ MantaRay#ReceiveCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr); |
| 809 | |
| 810 | void UpdateSquadListcxx . . $ MantaRay#UpdateSquadList(d4f767463ce0a6b3).(int me); |
| 811 | void UpdateSquadcxx . . $ MantaRay#UpdateSquad(d4f767463ce0a6b3).(int me); |
| 812 | |
| 813 | public: |
| 814 | MantaRaycxx . . $ MantaRay#MantaRay(49f6e7a06ebc5aa8).() {} |
| 815 | int16_t CallEventcxx . . $ MantaRay#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 816 | }; |
| 817 | |
| 818 | //------------------ |
| 819 | // Skiff class |
| 820 | //------------------ |
| 821 | |
| 822 | struct skiff_datacxx . . $ skiff_data# { |
| 823 | char modecxx . . $ skiff_data#mode.; |
| 824 | float mode_timecxx . . $ skiff_data#mode_time.; |
| 825 | float next_mode_timecxx . . $ skiff_data#next_mode_time.; |
| 826 | |
| 827 | float base_speedcxx . . $ skiff_data#base_speed.; // We alter this when we are in catchup mode |
| 828 | float attack_speedcxx . . $ skiff_data#attack_speed.; |
| 829 | |
| 830 | int flagscxx . . $ skiff_data#flags.; |
| 831 | |
| 832 | uint16_tcxx . . $ uint16_t# skiff_idcxx . . $ skiff_data#skiff_id.; |
| 833 | |
| 834 | int leader_handlecxx . . $ skiff_data#leader_handle.; |
| 835 | int num_teammatescxx . . $ skiff_data#num_teammates.; |
| 836 | int teammatecxx . . $ skiff_data#teammate.[MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!]; |
| 837 | float next_update_squad_timecxx . . $ skiff_data#next_update_squad_time.; |
| 838 | |
| 839 | vectorcxx . . $ vector# goal_poscxx . . $ skiff_data#goal_pos.; |
| 840 | int goal_roomcxx . . $ skiff_data#goal_room.; |
| 841 | |
| 842 | }; |
| 843 | |
| 844 | class Skiffcxx . . $ Skiff# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 845 | private: |
| 846 | skiff_datacxx . . $ skiff_data# *memorycxx . . $ Skiff#memory.; |
| 847 | void DoInitcxx . . $ Skiff#DoInit(d4f767463ce0a6b3).(int me); |
| 848 | |
| 849 | void DoSquadieFramecxx . . $ Skiff#DoSquadieFrame(d4f767463ce0a6b3).(int me); |
| 850 | void DoFramecxx . . $ Skiff#DoFrame(d4f767463ce0a6b3).(int me); |
| 851 | void SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 852 | bool DoNotifycxx . . $ Skiff#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 853 | |
| 854 | bool SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr); |
| 855 | bool ReceiveCommandcxx . . $ Skiff#ReceiveCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr); |
| 856 | |
| 857 | void UpdateSquadListcxx . . $ Skiff#UpdateSquadList(d4f767463ce0a6b3).(int me); |
| 858 | void UpdateSquadcxx . . $ Skiff#UpdateSquad(d4f767463ce0a6b3).(int me); |
| 859 | |
| 860 | public: |
| 861 | Skiffcxx . . $ Skiff#Skiff(49f6e7a06ebc5aa8).() {} |
| 862 | int16_t CallEventcxx . . $ Skiff#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 863 | }; |
| 864 | |
| 865 | //------------------ |
| 866 | // SpyHunter class |
| 867 | //------------------ |
| 868 | |
| 869 | #define SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`! 0 |
| 870 | #define SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`! 1 |
| 871 | #define SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`! 2 |
| 872 | |
| 873 | #define SH_MAX_BOMB_TIMEcxx . . $ `scripts/AIGame.cpp:873:9`! 15.0f |
| 874 | #define SH_BOMB_ACCELERATIONcxx . . $ `scripts/AIGame.cpp:874:9`! 8.0f |
| 875 | #define SH_BOMB_ROT_ACCcxx . . $ `scripts/AIGame.cpp:875:9`! 4000.0f |
| 876 | |
| 877 | #define SH_BOMB_TICK_RAMP_TIMEcxx . . $ `scripts/AIGame.cpp:877:9`! 5.0 |
| 878 | #define SH_MAX_TICK_INTERVALcxx . . $ `scripts/AIGame.cpp:878:9`! 0.5f |
| 879 | #define SH_MIN_TICK_INTERVALcxx . . $ `scripts/AIGame.cpp:879:9`! .06f |
| 880 | |
| 881 | struct spyhunter_datacxx . . $ spyhunter_data# { |
| 882 | char modecxx . . $ spyhunter_data#mode.; |
| 883 | float next_mode_timecxx . . $ spyhunter_data#next_mode_time.; |
| 884 | float next_summon_timecxx . . $ spyhunter_data#next_summon_time.; |
| 885 | bool f_hit_by_emdcxx . . $ spyhunter_data#f_hit_by_emd.; |
| 886 | float mode_timecxx . . $ spyhunter_data#mode_time.; |
| 887 | char last_attack_modecxx . . $ spyhunter_data#last_attack_mode.; |
| 888 | uint16_tcxx . . $ uint16_t# emd_idcxx . . $ spyhunter_data#emd_id.; |
| 889 | int tick_soundcxx . . $ spyhunter_data#tick_sound.; |
| 890 | float last_tick_timecxx . . $ spyhunter_data#last_tick_time.; |
| 891 | |
| 892 | }; |
| 893 | |
| 894 | class SpyHuntercxx . . $ SpyHunter# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 895 | private: |
| 896 | spyhunter_datacxx . . $ spyhunter_data# *memorycxx . . $ SpyHunter#memory.; |
| 897 | void DoInitcxx . . $ SpyHunter#DoInit(d4f767463ce0a6b3).(int me); |
| 898 | void DoFramecxx . . $ SpyHunter#DoFrame(d4f767463ce0a6b3).(int me); |
| 899 | void DoSummoncxx . . $ SpyHunter#DoSummon(d4f767463ce0a6b3).(int me); |
| 900 | bool DoNotifycxx . . $ SpyHunter#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 901 | void SetModecxx . . $ SpyHunter#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 902 | |
| 903 | public: |
| 904 | SpyHuntercxx . . $ SpyHunter#SpyHunter(49f6e7a06ebc5aa8).() {} |
| 905 | int16_t CallEventcxx . . $ SpyHunter#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 906 | }; |
| 907 | |
| 908 | //------------------ |
| 909 | // Sniper class |
| 910 | //------------------ |
| 911 | |
| 912 | #define SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:912:9`! 0 |
| 913 | #define SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:913:9`! 1 |
| 914 | |
| 915 | struct sniper_datacxx . . $ sniper_data# { |
| 916 | char modecxx . . $ sniper_data#mode.; |
| 917 | float mode_timecxx . . $ sniper_data#mode_time.; |
| 918 | float time_till_next_modecxx . . $ sniper_data#time_till_next_mode.; |
| 919 | |
| 920 | float base_speedcxx . . $ sniper_data#base_speed.; |
| 921 | float base_acccxx . . $ sniper_data#base_acc.; |
| 922 | }; |
| 923 | |
| 924 | class Snipercxx . . $ Sniper# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 925 | sniper_datacxx . . $ sniper_data# *memorycxx . . $ Sniper#memory.; |
| 926 | void DoInitcxx . . $ Sniper#DoInit(d4f767463ce0a6b3).(int me); |
| 927 | void DoFramecxx . . $ Sniper#DoFrame(d4f767463ce0a6b3).(int me); |
| 928 | bool DoNotifycxx . . $ Sniper#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 929 | void SetModecxx . . $ Sniper#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 930 | |
| 931 | public: |
| 932 | Snipercxx . . $ Sniper#Sniper(49f6e7a06ebc5aa8).() {} |
| 933 | int16_t CallEventcxx . . $ Sniper#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 934 | }; |
| 935 | |
| 936 | //------------------ |
| 937 | // SniperNoRun class |
| 938 | //------------------ |
| 939 | |
| 940 | #define SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`! 0 |
| 941 | #define SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:941:9`! 1 |
| 942 | |
| 943 | struct snipernorun_datacxx . . $ snipernorun_data# { |
| 944 | char modecxx . . $ snipernorun_data#mode.; |
| 945 | float mode_timecxx . . $ snipernorun_data#mode_time.; |
| 946 | float time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode.; |
| 947 | |
| 948 | float base_speedcxx . . $ snipernorun_data#base_speed.; |
| 949 | float base_acccxx . . $ snipernorun_data#base_acc.; |
| 950 | }; |
| 951 | |
| 952 | class SniperNoRuncxx . . $ SniperNoRun# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 953 | snipernorun_datacxx . . $ snipernorun_data# *memorycxx . . $ SniperNoRun#memory.; |
| 954 | void DoInitcxx . . $ SniperNoRun#DoInit(d4f767463ce0a6b3).(int me); |
| 955 | void DoFramecxx . . $ SniperNoRun#DoFrame(d4f767463ce0a6b3).(int me); |
| 956 | bool DoNotifycxx . . $ SniperNoRun#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 957 | void SetModecxx . . $ SniperNoRun#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 958 | |
| 959 | public: |
| 960 | SniperNoRuncxx . . $ SniperNoRun#SniperNoRun(49f6e7a06ebc5aa8).() {} |
| 961 | int16_t CallEventcxx . . $ SniperNoRun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 962 | }; |
| 963 | |
| 964 | //------------------ |
| 965 | // EvaderModA class |
| 966 | //------------------ |
| 967 | |
| 968 | struct evadermoda_datacxx . . $ evadermoda_data# { |
| 969 | char modecxx . . $ evadermoda_data#mode.; |
| 970 | float mode_timecxx . . $ evadermoda_data#mode_time.; |
| 971 | float time_till_next_modecxx . . $ evadermoda_data#time_till_next_mode.; |
| 972 | |
| 973 | float base_speedcxx . . $ evadermoda_data#base_speed.; |
| 974 | float base_acccxx . . $ evadermoda_data#base_acc.; |
| 975 | }; |
| 976 | |
| 977 | class EvaderModAcxx . . $ EvaderModA# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 978 | evadermoda_datacxx . . $ evadermoda_data# *memorycxx . . $ EvaderModA#memory.; |
| 979 | void DoInitcxx . . $ EvaderModA#DoInit(d4f767463ce0a6b3).(int me); |
| 980 | void DoFramecxx . . $ EvaderModA#DoFrame(d4f767463ce0a6b3).(int me); |
| 981 | bool DoNotifycxx . . $ EvaderModA#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 982 | void SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 983 | |
| 984 | public: |
| 985 | EvaderModAcxx . . $ EvaderModA#EvaderModA(49f6e7a06ebc5aa8).() {} |
| 986 | int16_t CallEventcxx . . $ EvaderModA#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 987 | }; |
| 988 | |
| 989 | //------------------ |
| 990 | // FlameRAS class |
| 991 | //------------------ |
| 992 | |
| 993 | struct flameras_datacxx . . $ flameras_data# { |
| 994 | char modecxx . . $ flameras_data#mode.; |
| 995 | float mode_timecxx . . $ flameras_data#mode_time.; |
| 996 | float time_till_next_modecxx . . $ flameras_data#time_till_next_mode.; |
| 997 | |
| 998 | float base_speedcxx . . $ flameras_data#base_speed.; |
| 999 | float base_acccxx . . $ flameras_data#base_acc.; |
| 1000 | |
| 1001 | float time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle.; |
| 1002 | bool f_firing_okcxx . . $ flameras_data#f_firing_ok.; |
| 1003 | }; |
| 1004 | |
| 1005 | class FlameRAScxx . . $ FlameRAS# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1006 | flameras_datacxx . . $ flameras_data# *memorycxx . . $ FlameRAS#memory.; |
| 1007 | void DoInitcxx . . $ FlameRAS#DoInit(d4f767463ce0a6b3).(int me); |
| 1008 | void DoFramecxx . . $ FlameRAS#DoFrame(d4f767463ce0a6b3).(int me); |
| 1009 | bool DoNotifycxx . . $ FlameRAS#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1010 | void SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 1011 | |
| 1012 | public: |
| 1013 | FlameRAScxx . . $ FlameRAS#FlameRAS(49f6e7a06ebc5aa8).() {} |
| 1014 | int16_t CallEventcxx . . $ FlameRAS#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1015 | }; |
| 1016 | |
| 1017 | //----------------- |
| 1018 | // Jugg |
| 1019 | //----------------- |
| 1020 | |
| 1021 | #define JUGG_NORMALcxx . . $ `scripts/AIGame.cpp:1021:9`! 0 |
| 1022 | #define JUGG_DYINGcxx . . $ `scripts/AIGame.cpp:1022:9`! 1 |
| 1023 | |
| 1024 | #define JUGG_F_BELLY_DEADcxx . . $ `scripts/AIGame.cpp:1024:9`! 0x01 |
| 1025 | #define JUGG_F_HEAD_DEADcxx . . $ `scripts/AIGame.cpp:1025:9`! 0x02 |
| 1026 | #define JUGG_F_BODY_DEADcxx . . $ `scripts/AIGame.cpp:1026:9`! 0x04 |
| 1027 | |
| 1028 | struct jugg_datacxx . . $ jugg_data# { |
| 1029 | float last_framecxx . . $ jugg_data#last_frame.; |
| 1030 | int foot_soundcxx . . $ jugg_data#foot_sound.; |
| 1031 | |
| 1032 | int head_objectcxx . . $ jugg_data#head_object.; |
| 1033 | int belly_objectcxx . . $ jugg_data#belly_object.; |
| 1034 | int turret_objectcxx . . $ jugg_data#turret_object.[6]; |
| 1035 | int head_turretcxx . . $ jugg_data#head_turret.[2]; |
| 1036 | int flame_turretcxx . . $ jugg_data#flame_turret.[3]; |
| 1037 | |
| 1038 | float mode_timecxx . . $ jugg_data#mode_time.; |
| 1039 | char modecxx . . $ jugg_data#mode.; |
| 1040 | char flagscxx . . $ jugg_data#flags.; |
| 1041 | }; |
| 1042 | |
| 1043 | class Juggcxx . . $ Jugg# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1044 | private: |
| 1045 | jugg_datacxx . . $ jugg_data# *memorycxx . . $ Jugg#memory.; |
| 1046 | void DoInitcxx . . $ Jugg#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1047 | void DoFramecxx . . $ Jugg#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1048 | void SetModecxx . . $ Jugg#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 1049 | |
| 1050 | public: |
| 1051 | Juggcxx . . $ Jugg#Jugg(49f6e7a06ebc5aa8).() {} |
| 1052 | int16_t CallEventcxx . . $ Jugg#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1053 | }; |
| 1054 | |
| 1055 | //----------------- |
| 1056 | // Death Tower |
| 1057 | //----------------- |
| 1058 | |
| 1059 | struct dtower_datacxx . . $ dtower_data# { |
| 1060 | int gun_handlecxx . . $ dtower_data#gun_handle.; |
| 1061 | int ball_handlecxx . . $ dtower_data#ball_handle.; |
| 1062 | |
| 1063 | float mode_timecxx . . $ dtower_data#mode_time.; |
| 1064 | |
| 1065 | bool f_diedcxx . . $ dtower_data#f_died.; |
| 1066 | float last_framecxx . . $ dtower_data#last_frame.; |
| 1067 | }; |
| 1068 | |
| 1069 | class DTowercxx . . $ DTower# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1070 | private: |
| 1071 | dtower_datacxx . . $ dtower_data# *memorycxx . . $ DTower#memory.; |
| 1072 | void DoInitcxx . . $ DTower#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1073 | void DoFramecxx . . $ DTower#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1074 | |
| 1075 | public: |
| 1076 | DTowercxx . . $ DTower#DTower(49f6e7a06ebc5aa8).() {} |
| 1077 | int16_t CallEventcxx . . $ DTower#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1078 | }; |
| 1079 | |
| 1080 | //----------------- |
| 1081 | // Death Collector |
| 1082 | //----------------- |
| 1083 | |
| 1084 | struct dcollector_datacxx . . $ dcollector_data# { |
| 1085 | int ball_handlecxx . . $ dcollector_data#ball_handle.; |
| 1086 | int rod_handlecxx . . $ dcollector_data#rod_handle.; |
| 1087 | int target_handlecxx . . $ dcollector_data#target_handle.; |
| 1088 | |
| 1089 | bool f_deadcxx . . $ dcollector_data#f_dead.; |
| 1090 | }; |
| 1091 | |
| 1092 | class DCollectorcxx . . $ DCollector# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1093 | private: |
| 1094 | dcollector_datacxx . . $ dcollector_data# *memorycxx . . $ DCollector#memory.; |
| 1095 | void DoInitcxx . . $ DCollector#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1096 | void DoFramecxx . . $ DCollector#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1097 | |
| 1098 | public: |
| 1099 | DCollectorcxx . . $ DCollector#DCollector(49f6e7a06ebc5aa8).() {} |
| 1100 | int16_t CallEventcxx . . $ DCollector#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1101 | }; |
| 1102 | |
| 1103 | //----------------- |
| 1104 | // Chemical Ball |
| 1105 | //----------------- |
| 1106 | |
| 1107 | struct cball_datacxx . . $ cball_data# { |
| 1108 | bool f_picked_upcxx . . $ cball_data#f_picked_up.; |
| 1109 | float mode_timecxx . . $ cball_data#mode_time.; |
| 1110 | }; |
| 1111 | |
| 1112 | class CBallcxx . . $ CBall# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1113 | private: |
| 1114 | cball_datacxx . . $ cball_data# *memorycxx . . $ CBall#memory.; |
| 1115 | void DoInitcxx . . $ CBall#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1116 | void DoFramecxx . . $ CBall#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1117 | |
| 1118 | public: |
| 1119 | CBallcxx . . $ CBall#CBall(49f6e7a06ebc5aa8).() {} |
| 1120 | int16_t CallEventcxx . . $ CBall#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1121 | }; |
| 1122 | |
| 1123 | //----------------- |
| 1124 | // SixGun |
| 1125 | //----------------- |
| 1126 | |
| 1127 | struct sixgun_datacxx . . $ sixgun_data# { |
| 1128 | int modecxx . . $ sixgun_data#mode.; |
| 1129 | float max_speedcxx . . $ sixgun_data#max_speed.; |
| 1130 | float circle_distcxx . . $ sixgun_data#circle_dist.; |
| 1131 | }; |
| 1132 | |
| 1133 | class SixGuncxx . . $ SixGun# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1134 | private: |
| 1135 | sixgun_datacxx . . $ sixgun_data# *memorycxx . . $ SixGun#memory.; |
| 1136 | void DoInitcxx . . $ SixGun#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1137 | bool DoNotifycxx . . $ SixGun#DoNotify(4ce66e6d2248ca63).(int me_handle, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 1138 | |
| 1139 | public: |
| 1140 | SixGuncxx . . $ SixGun#SixGun(49f6e7a06ebc5aa8).() {} |
| 1141 | int16_t CallEventcxx . . $ SixGun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1142 | }; |
| 1143 | |
| 1144 | //----------------- |
| 1145 | // Explode Time Out |
| 1146 | //----------------- |
| 1147 | |
| 1148 | struct explodetimeout_datacxx . . $ explodetimeout_data# { |
| 1149 | float life_leftcxx . . $ explodetimeout_data#life_left.; |
| 1150 | }; |
| 1151 | |
| 1152 | class ExplodeTimeOutcxx . . $ ExplodeTimeOut# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1153 | private: |
| 1154 | explodetimeout_datacxx . . $ explodetimeout_data# *memorycxx . . $ ExplodeTimeOut#memory.; |
| 1155 | void DoInitcxx . . $ ExplodeTimeOut#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1156 | |
| 1157 | public: |
| 1158 | int16_t CallEventcxx . . $ ExplodeTimeOut#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1159 | }; |
| 1160 | |
| 1161 | //----------------- |
| 1162 | // Sickle |
| 1163 | //----------------- |
| 1164 | |
| 1165 | #define SICKLE_GOING_HOMEcxx . . $ `scripts/AIGame.cpp:1165:9`! 3 // Going home |
| 1166 | #define SICKLE_LAND_ON_CEILINGcxx . . $ `scripts/AIGame.cpp:1166:9`! 10 // Rotating upsidedown and going to the ceiling |
| 1167 | #define SICKLE_LANDEDcxx . . $ `scripts/AIGame.cpp:1167:9`! 12 // Stopped on the ceiling |
| 1168 | #define SICKLE_MELEEcxx . . $ `scripts/AIGame.cpp:1168:9`! 15 // Melee |
| 1169 | |
| 1170 | struct sickle_datacxx . . $ sickle_data# { |
| 1171 | int modecxx . . $ sickle_data#mode.; |
| 1172 | float mode_timecxx . . $ sickle_data#mode_time.; |
| 1173 | |
| 1174 | vectorcxx . . $ vector# ceiling_poscxx . . $ sickle_data#ceiling_pos.; |
| 1175 | |
| 1176 | float last_fvi_check_timecxx . . $ sickle_data#last_fvi_check_time.; |
| 1177 | float rot_speedcxx . . $ sickle_data#rot_speed.; |
| 1178 | float speedcxx . . $ sickle_data#speed.; |
| 1179 | float sleep_speedcxx . . $ sickle_data#sleep_speed.; |
| 1180 | float sleep_rot_speedcxx . . $ sickle_data#sleep_rot_speed.; |
| 1181 | bool done_turningcxx . . $ sickle_data#done_turning.; |
| 1182 | bool done_movingcxx . . $ sickle_data#done_moving.; |
| 1183 | vectorcxx . . $ vector# home_poscxx . . $ sickle_data#home_pos.; |
| 1184 | int home_roomcxx . . $ sickle_data#home_room.; |
| 1185 | vectorcxx . . $ vector# home_fveccxx . . $ sickle_data#home_fvec.; |
| 1186 | |
| 1187 | }; |
| 1188 | |
| 1189 | class Sicklecxx . . $ Sickle# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1190 | private: |
| 1191 | sickle_datacxx . . $ sickle_data# *memorycxx . . $ Sickle#memory.; |
| 1192 | void SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 1193 | void DoInitcxx . . $ Sickle#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1194 | void DoFramecxx . . $ Sickle#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1195 | bool DoNotifycxx . . $ Sickle#DoNotify(4ce66e6d2248ca63).(int me_handle, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 1196 | |
| 1197 | public: |
| 1198 | Sicklecxx . . $ Sickle#Sickle(49f6e7a06ebc5aa8).() {} |
| 1199 | int16_t CallEventcxx . . $ Sickle#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1200 | }; |
| 1201 | |
| 1202 | //----------------- |
| 1203 | // Bouncing Betty |
| 1204 | //----------------- |
| 1205 | |
| 1206 | struct tBettyBombInfocxx . . $ tBettyBombInfo# { |
| 1207 | bool explodecxx . . $ tBettyBombInfo#explode.; |
| 1208 | }; |
| 1209 | |
| 1210 | class BettyBombcxx . . $ BettyBomb# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1211 | public: |
| 1212 | BettyBombcxx . . $ BettyBomb#BettyBomb(49f6e7a06ebc5aa8).() { memorycxx . . $ BettyBomb#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 1213 | int16_t CallEventcxx . . $ BettyBomb#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1214 | |
| 1215 | private: |
| 1216 | tBettyBombInfocxx . . $ tBettyBombInfo# *memorycxx . . $ BettyBomb#memory.; |
| 1217 | }; |
| 1218 | |
| 1219 | struct tBettyInfocxx . . $ tBettyInfo# { |
| 1220 | bool explodecxx . . $ tBettyInfo#explode.; |
| 1221 | float lasttimecxx . . $ tBettyInfo#lasttime.; |
| 1222 | }; |
| 1223 | |
| 1224 | class BettyScriptcxx . . $ BettyScript# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1225 | public: |
| 1226 | BettyScriptcxx . . $ BettyScript#BettyScript(49f6e7a06ebc5aa8).() { memorycxx . . $ BettyScript#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 1227 | int16_t CallEventcxx . . $ BettyScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1228 | |
| 1229 | protected: |
| 1230 | void DoInitcxx . . $ BettyScript#DoInit(d4f767463ce0a6b3).(int me); |
| 1231 | |
| 1232 | private: |
| 1233 | tBettyInfocxx . . $ tBettyInfo# *memorycxx . . $ BettyScript#memory.; |
| 1234 | }; |
| 1235 | |
| 1236 | //----------------- |
| 1237 | // Chaff |
| 1238 | //----------------- |
| 1239 | |
| 1240 | struct tChaffInfocxx . . $ tChaffInfo# { |
| 1241 | bool killmecxx . . $ tChaffInfo#killme.; |
| 1242 | }; |
| 1243 | |
| 1244 | class ChaffScriptcxx . . $ ChaffScript# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1245 | public: |
| 1246 | ChaffScriptcxx . . $ ChaffScript#ChaffScript(49f6e7a06ebc5aa8).() { memorycxx . . $ ChaffScript#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 1247 | int16_t CallEventcxx . . $ ChaffScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1248 | |
| 1249 | protected: |
| 1250 | void DoInitcxx . . $ ChaffScript#DoInit(d4f767463ce0a6b3).(int me); |
| 1251 | void DoIntervalcxx . . $ ChaffScript#DoInterval(d4f767463ce0a6b3).(int handle); |
| 1252 | |
| 1253 | private: |
| 1254 | tChaffInfocxx . . $ tChaffInfo# *memorycxx . . $ ChaffScript#memory.; |
| 1255 | }; |
| 1256 | |
| 1257 | struct tChaffChunkInfocxx . . $ tChaffChunkInfo# { |
| 1258 | bool killmecxx . . $ tChaffChunkInfo#killme.; |
| 1259 | float lifeleftcxx . . $ tChaffChunkInfo#lifeleft.; |
| 1260 | }; |
| 1261 | |
| 1262 | class ChaffChunkScriptcxx . . $ ChaffChunkScript# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1263 | public: |
| 1264 | ChaffChunkScriptcxx . . $ ChaffChunkScript#ChaffChunkScript(49f6e7a06ebc5aa8).() { memorycxx . . $ ChaffChunkScript#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 1265 | int16_t CallEventcxx . . $ ChaffChunkScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1266 | |
| 1267 | protected: |
| 1268 | void DoInitcxx . . $ ChaffChunkScript#DoInit(d4f767463ce0a6b3).(int me); |
| 1269 | void DoIntervalcxx . . $ ChaffChunkScript#DoInterval(43c79ee2f1b9aefe).(int handle, float time); |
| 1270 | void DoCollidecxx . . $ ChaffChunkScript#DoCollide(67333b58276f6108).(tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1271 | |
| 1272 | private: |
| 1273 | tChaffChunkInfocxx . . $ tChaffChunkInfo# *memorycxx . . $ ChaffChunkScript#memory.; |
| 1274 | }; |
| 1275 | |
| 1276 | //------------------ |
| 1277 | // ProxMine class |
| 1278 | //------------------ |
| 1279 | |
| 1280 | class ProxMinecxx . . $ ProxMine# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1281 | private: |
| 1282 | void DoInitcxx . . $ ProxMine#DoInit(d4f767463ce0a6b3).(int me); |
| 1283 | void DoCollidecxx . . $ ProxMine#DoCollide(d4f767463ce0a6b3).(int me); |
| 1284 | |
| 1285 | public: |
| 1286 | ProxMinecxx . . $ ProxMine#ProxMine(49f6e7a06ebc5aa8).() {} |
| 1287 | int16_t CallEventcxx . . $ ProxMine#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1288 | }; |
| 1289 | |
| 1290 | //------------------ |
| 1291 | // Gunboy class |
| 1292 | //------------------ |
| 1293 | |
| 1294 | class Gunboycxx . . $ Gunboy# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1295 | public: |
| 1296 | Gunboycxx . . $ Gunboy#Gunboy(49f6e7a06ebc5aa8).() {} |
| 1297 | int16_t CallEventcxx . . $ Gunboy#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1298 | }; |
| 1299 | |
| 1300 | //----------------- |
| 1301 | // GBPowerup |
| 1302 | //----------------- |
| 1303 | |
| 1304 | struct gbpowerup_datacxx . . $ gbpowerup_data# { |
| 1305 | char typecxx . . $ gbpowerup_data#type.; // 0 - 5 matching up with the gb powerups! |
| 1306 | float next_check_timecxx . . $ gbpowerup_data#next_check_time.; |
| 1307 | float time_till_next_hud_messagecxx . . $ gbpowerup_data#time_till_next_hud_message.; |
| 1308 | }; |
| 1309 | |
| 1310 | class GBPowerupcxx . . $ GBPowerup# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1311 | private: |
| 1312 | gbpowerup_datacxx . . $ gbpowerup_data# *memorycxx . . $ GBPowerup#memory.; |
| 1313 | void DoInitcxx . . $ GBPowerup#DoInit(d4f767463ce0a6b3).(int me); |
| 1314 | void DoFramecxx . . $ GBPowerup#DoFrame(d4f767463ce0a6b3).(int me); |
| 1315 | |
| 1316 | public: |
| 1317 | GBPowerupcxx . . $ GBPowerup#GBPowerup(49f6e7a06ebc5aa8).() {} |
| 1318 | int16_t CallEventcxx . . $ GBPowerup#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1319 | }; |
| 1320 | |
| 1321 | //----------------- |
| 1322 | // Josh Bell |
| 1323 | //----------------- |
| 1324 | |
| 1325 | struct joshbell_datacxx . . $ joshbell_data# { |
| 1326 | int mecxx . . $ joshbell_data#me.; |
| 1327 | int attach_cagecxx . . $ joshbell_data#attach_cage.; |
| 1328 | float last_play_timecxx . . $ joshbell_data#last_play_time.; |
| 1329 | int bell_soundcxx . . $ joshbell_data#bell_sound.; |
| 1330 | }; |
| 1331 | |
| 1332 | class JoshBellcxx . . $ JoshBell# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1333 | private: |
| 1334 | joshbell_datacxx . . $ joshbell_data# *memorycxx . . $ JoshBell#memory.; |
| 1335 | void DoInitcxx . . $ JoshBell#DoInit(d4f767463ce0a6b3).(int me); |
| 1336 | void DoCollidecxx . . $ JoshBell#DoCollide(d4f767463ce0a6b3).(int me); |
| 1337 | |
| 1338 | public: |
| 1339 | JoshBellcxx . . $ JoshBell#JoshBell(49f6e7a06ebc5aa8).() {} |
| 1340 | int16_t CallEventcxx . . $ JoshBell#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1341 | }; |
| 1342 | |
| 1343 | //----------------- |
| 1344 | // Explode On Contact |
| 1345 | //----------------- |
| 1346 | |
| 1347 | class ExplodeOnContactcxx . . $ ExplodeOnContact# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1348 | private: |
| 1349 | void DoCollidecxx . . $ ExplodeOnContact#DoCollide(3e454b8ccf442868).(int me, int it_handle); |
| 1350 | |
| 1351 | public: |
| 1352 | ExplodeOnContactcxx . . $ ExplodeOnContact#ExplodeOnContact(49f6e7a06ebc5aa8).() {} |
| 1353 | int16_t CallEventcxx . . $ ExplodeOnContact#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1354 | }; |
| 1355 | |
| 1356 | //----------------- |
| 1357 | // Destroy On Contact |
| 1358 | //----------------- |
| 1359 | |
| 1360 | class DestroyOnContactcxx . . $ DestroyOnContact# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1361 | private: |
| 1362 | void DoCollidecxx . . $ DestroyOnContact#DoCollide(3e454b8ccf442868).(int me, int it_handle); |
| 1363 | |
| 1364 | public: |
| 1365 | DestroyOnContactcxx . . $ DestroyOnContact#DestroyOnContact(49f6e7a06ebc5aa8).() {} |
| 1366 | int16_t CallEventcxx . . $ DestroyOnContact#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1367 | }; |
| 1368 | |
| 1369 | //----------------- |
| 1370 | // GuideBot |
| 1371 | //----------------- |
| 1372 | |
| 1373 | // Goal levels: |
| 1374 | #define GBL_AMBIENTcxx . . $ `scripts/AIGame.cpp:1374:9`! 0 // Ambient movement and activities |
| 1375 | #define GBL_COMMANDcxx . . $ `scripts/AIGame.cpp:1375:9`! 1 // Regular commands (like find powerup) |
| 1376 | #define GBL_OVERRIDEcxx . . $ `scripts/AIGame.cpp:1376:9`! 2 // Overriding commands like (return to player) or putting out fires??? --chrishack |
| 1377 | #define GBL_MANDITORYcxx . . $ `scripts/AIGame.cpp:1377:9`! 3 // Flying back to ship |
| 1378 | |
| 1379 | #define GB_GUID_RTYPE_SUB_DIR_DONEcxx . . $ `scripts/AIGame.cpp:1379:9`! 0x10010001 |
| 1380 | #define GB_GUID_RETURNED_TO_PLAYERcxx . . $ `scripts/AIGame.cpp:1380:9`! 0x10010002 |
| 1381 | #define GB_GUID_AT_GOALcxx . . $ `scripts/AIGame.cpp:1381:9`! 0x10010003 |
| 1382 | |
| 1383 | // Modes |
| 1384 | #define GBM_IN_SHIPcxx . . $ `scripts/AIGame.cpp:1384:9`! 0 // In the player ship |
| 1385 | #define GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`! 1 // Doing command or idling |
| 1386 | #define GBM_DOING_TASKcxx . . $ `scripts/AIGame.cpp:1386:9`! 2 // -- might get rid of this one!!!!!!!!! I will just add a GBSM_ (doing task) |
| 1387 | #define GBM_KIDNAPPEDcxx . . $ `scripts/AIGame.cpp:1387:9`! 3 |
| 1388 | #define GBM_TALKINGcxx . . $ `scripts/AIGame.cpp:1388:9`! 4 |
| 1389 | #define GBM_THIEFcxx . . $ `scripts/AIGame.cpp:1389:9`! 5 |
| 1390 | #define GBM_ON_FIREcxx . . $ `scripts/AIGame.cpp:1390:9`! 6 |
| 1391 | #define GBM_MANUALcxx . . $ `scripts/AIGame.cpp:1391:9`! 7 |
| 1392 | #define GBM_RTYPEcxx . . $ `scripts/AIGame.cpp:1392:9`! 8 |
| 1393 | #define GBM_GO_WINGNUTcxx . . $ `scripts/AIGame.cpp:1393:9`! 9 |
| 1394 | #define GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`! 10 |
| 1395 | #define GBM_BIRTHcxx . . $ `scripts/AIGame.cpp:1395:9`! 11 |
| 1396 | #define GBM_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1396:9`! 12 |
| 1397 | #define GBM_RESPAWN_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1397:9`! 13 |
| 1398 | |
| 1399 | // Sub-modes for normal mode |
| 1400 | #define GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`! 0 |
| 1401 | #define GBSM_OPEN_DOORcxx . . $ `scripts/AIGame.cpp:1401:9`! 1 |
| 1402 | #define GBSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1402:9`! 2 |
| 1403 | #define GBSM_RETURNINGcxx . . $ `scripts/AIGame.cpp:1403:9`! 3 |
| 1404 | #define GBSM_ANTI_VIRUScxx . . $ `scripts/AIGame.cpp:1404:9`! 4 |
| 1405 | |
| 1406 | #define GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`! 0x0001 |
| 1407 | #define GBF_THIEF_REPELcxx . . $ `scripts/AIGame.cpp:1407:9`! 0x0002 |
| 1408 | #define GBF_POW_SPEEDcxx . . $ `scripts/AIGame.cpp:1408:9`! 0x0004 |
| 1409 | #define GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`! 0x0008 |
| 1410 | #define GBF_SAW_BOSScxx . . $ `scripts/AIGame.cpp:1410:9`! 0x0010 |
| 1411 | #define GBF_WANT_TO_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1411:9`! 0x0020 |
| 1412 | #define GBF_EXTINGUISHINGcxx . . $ `scripts/AIGame.cpp:1412:9`! 0x0040 |
| 1413 | #define GBF_IN_CUSTOM_ANIMcxx . . $ `scripts/AIGame.cpp:1413:9`! 0x0080 |
| 1414 | #define GBF_WANT_TO_USE_ANTI_VIRUScxx . . $ `scripts/AIGame.cpp:1414:9`! 0x0100 |
| 1415 | #define GBF_USING_ANTI_VIRUScxx . . $ `scripts/AIGame.cpp:1415:9`! 0x0200 |
| 1416 | #define GBF_WANTING_TO_ENTER_PDEADcxx . . $ `scripts/AIGame.cpp:1416:9`! 0x0400 |
| 1417 | |
| 1418 | #define NUM_GB_COMMANDScxx . . $ `scripts/AIGame.cpp:1418:9`! 44 |
| 1419 | |
| 1420 | // Commands |
| 1421 | #define GBC_EXIT_SHIPcxx . . $ `scripts/AIGame.cpp:1421:9`! 0 |
| 1422 | #define GBC_REPAIR_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:1422:9`! 1 |
| 1423 | #define GBC_RENAMEcxx . . $ `scripts/AIGame.cpp:1423:9`! 2 |
| 1424 | #define GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! 3 |
| 1425 | #define GBC_FIND_ACTIVE_GOAL_1cxx . . $ `scripts/AIGame.cpp:1425:9`! 4 |
| 1426 | #define GBC_FIND_ACTIVE_GOAL_2cxx . . $ `scripts/AIGame.cpp:1426:9`! 5 |
| 1427 | #define GBC_FIND_ACTIVE_GOAL_3cxx . . $ `scripts/AIGame.cpp:1427:9`! 6 |
| 1428 | #define GBC_FIND_ACTIVE_GOAL_4cxx . . $ `scripts/AIGame.cpp:1428:9`! 7 |
| 1429 | #define GBC_FIND_ACTIVE_GOAL_5cxx . . $ `scripts/AIGame.cpp:1429:9`! 8 |
| 1430 | #define GBC_FIND_ACTIVE_GOAL_6cxx . . $ `scripts/AIGame.cpp:1430:9`! 9 |
| 1431 | #define GBC_FIND_ACTIVE_GOAL_7cxx . . $ `scripts/AIGame.cpp:1431:9`! 10 |
| 1432 | #define GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`! 11 |
| 1433 | #define GBC_FIND_ACTIVE_SEC_GOAL_1cxx . . $ `scripts/AIGame.cpp:1433:9`! 12 |
| 1434 | #define GBC_FIND_ACTIVE_SEC_GOAL_2cxx . . $ `scripts/AIGame.cpp:1434:9`! 13 |
| 1435 | #define GBC_FIND_ACTIVE_SEC_GOAL_3cxx . . $ `scripts/AIGame.cpp:1435:9`! 14 |
| 1436 | #define GBC_FIND_ACTIVE_SEC_GOAL_4cxx . . $ `scripts/AIGame.cpp:1436:9`! 15 |
| 1437 | #define GBC_FIND_ACTIVE_SEC_GOAL_5cxx . . $ `scripts/AIGame.cpp:1437:9`! 16 |
| 1438 | #define GBC_FIND_ACTIVE_SEC_GOAL_6cxx . . $ `scripts/AIGame.cpp:1438:9`! 17 |
| 1439 | #define GBC_FIND_ACTIVE_SEC_GOAL_7cxx . . $ `scripts/AIGame.cpp:1439:9`! 18 |
| 1440 | #define GBC_FIND_SPEWcxx . . $ `scripts/AIGame.cpp:1440:9`! 19 |
| 1441 | #define GBC_FIND_POWERUPcxx . . $ `scripts/AIGame.cpp:1441:9`! 20 |
| 1442 | #define GBC_FIND_ENERGY_CENTERcxx . . $ `scripts/AIGame.cpp:1442:9`! 21 |
| 1443 | #define GBC_FIND_ROBOTcxx . . $ `scripts/AIGame.cpp:1443:9`! 22 |
| 1444 | #define GBC_FIND_THIEFcxx . . $ `scripts/AIGame.cpp:1444:9`! 23 |
| 1445 | #define GBC_FIND_OUTSIDEcxx . . $ `scripts/AIGame.cpp:1445:9`! 24 |
| 1446 | #define GBC_FIND_MINEcxx . . $ `scripts/AIGame.cpp:1446:9`! 25 |
| 1447 | #define GBC_FIND_CLOSEST_MARKERcxx . . $ `scripts/AIGame.cpp:1447:9`! 26 |
| 1448 | #define GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`! 27 |
| 1449 | #define GBC_FIND_MARKER_1cxx . . $ `scripts/AIGame.cpp:1449:9`! 28 |
| 1450 | #define GBC_FIND_MARKER_2cxx . . $ `scripts/AIGame.cpp:1450:9`! 29 |
| 1451 | #define GBC_FIND_MARKER_3cxx . . $ `scripts/AIGame.cpp:1451:9`! 30 |
| 1452 | #define GBC_FIND_MARKER_4cxx . . $ `scripts/AIGame.cpp:1452:9`! 31 |
| 1453 | #define GBC_FIND_MARKER_5cxx . . $ `scripts/AIGame.cpp:1453:9`! 32 |
| 1454 | #define GBC_FIND_MARKER_6cxx . . $ `scripts/AIGame.cpp:1454:9`! 33 |
| 1455 | #define GBC_FIND_MARKER_7cxx . . $ `scripts/AIGame.cpp:1455:9`! 34 |
| 1456 | #define GBC_ESCORT_SHIPcxx . . $ `scripts/AIGame.cpp:1456:9`! 35 |
| 1457 | #define GBC_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1457:9`! 36 |
| 1458 | #define GBC_GO_WINGNUTcxx . . $ `scripts/AIGame.cpp:1458:9`! 37 |
| 1459 | #define GBC_TELEPRESENCEcxx . . $ `scripts/AIGame.cpp:1459:9`! 38 |
| 1460 | #define GBC_RTYPEcxx . . $ `scripts/AIGame.cpp:1460:9`! 39 |
| 1461 | #define GBC_ANTI_VIRUScxx . . $ `scripts/AIGame.cpp:1461:9`! 40 |
| 1462 | #define GBC_ALLOW_CHATTERcxx . . $ `scripts/AIGame.cpp:1462:9`! 41 |
| 1463 | #define GBC_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1463:9`! 42 |
| 1464 | #define GBC_RETURN_TO_SHIPcxx . . $ `scripts/AIGame.cpp:1464:9`! 43 |
| 1465 | #define GBC_RENAME_SILENTcxx . . $ `scripts/AIGame.cpp:1465:9`! 44 |
| 1466 | |
| 1467 | static int gb_command_textcxx . . $ gb_command_text.[NUM_GB_COMMANDScxx . . $ `scripts/AIGame.cpp:1418:9`!] = { |
| 1468 | TXT_GBM_EXITSHIPcxx . . $ `scripts/AIGame.cpp:59:9`!, TXT_GBM_REPAIRcxx . . $ `scripts/AIGame.cpp:58:9`!, TXT_GBM_RENAMEcxx . . $ `scripts/AIGame.cpp:57:9`!, TXT_GBM_P0cxx . . $ `scripts/AIGame.cpp:60:9`!, TXT_GBM_P1cxx . . $ `scripts/AIGame.cpp:61:9`!, |
| 1469 | TXT_GBM_P2cxx . . $ `scripts/AIGame.cpp:62:9`!, TXT_GBM_P3cxx . . $ `scripts/AIGame.cpp:63:9`!, TXT_GBM_P4cxx . . $ `scripts/AIGame.cpp:64:9`!, TXT_GBM_P5cxx . . $ `scripts/AIGame.cpp:65:9`!, TXT_GBM_P6cxx . . $ `scripts/AIGame.cpp:66:9`!, |
| 1470 | TXT_GBM_P7cxx . . $ `scripts/AIGame.cpp:67:9`!, TXT_GBM_S0cxx . . $ `scripts/AIGame.cpp:68:9`!, TXT_GBM_S1cxx . . $ `scripts/AIGame.cpp:69:9`!, TXT_GBM_S2cxx . . $ `scripts/AIGame.cpp:70:9`!, TXT_GBM_S3cxx . . $ `scripts/AIGame.cpp:71:9`!, |
| 1471 | TXT_GBM_S4cxx . . $ `scripts/AIGame.cpp:72:9`!, TXT_GBM_S5cxx . . $ `scripts/AIGame.cpp:73:9`!, TXT_GBM_S6cxx . . $ `scripts/AIGame.cpp:74:9`!, TXT_GBM_S7cxx . . $ `scripts/AIGame.cpp:75:9`!, TXT_GBM_FINDPOWERUPScxx . . $ `scripts/AIGame.cpp:76:9`!, |
| 1472 | TXT_GBM_FINEPOWERUPcxx . . $ `scripts/AIGame.cpp:77:9`!, TXT_GBM_FINDENERGYcxx . . $ `scripts/AIGame.cpp:78:9`!, TXT_GBM_FINDROBOTcxx . . $ `scripts/AIGame.cpp:79:9`!, TXT_GBM_FINDTHIEFcxx . . $ `scripts/AIGame.cpp:80:9`!, TXT_GBM_FINDEXITcxx . . $ `scripts/AIGame.cpp:81:9`!, |
| 1473 | TXT_GBM_FINDMINEcxx . . $ `scripts/AIGame.cpp:82:9`!, TXT_GBM_FINDCMARKcxx . . $ `scripts/AIGame.cpp:83:9`!, TXT_GBM_M0cxx . . $ `scripts/AIGame.cpp:84:9`!, TXT_GBM_M1cxx . . $ `scripts/AIGame.cpp:85:9`!, TXT_GBM_M2cxx . . $ `scripts/AIGame.cpp:86:9`!, |
| 1474 | TXT_GBM_M3cxx . . $ `scripts/AIGame.cpp:87:9`!, TXT_GBM_M4cxx . . $ `scripts/AIGame.cpp:88:9`!, TXT_GBM_M5cxx . . $ `scripts/AIGame.cpp:89:9`!, TXT_GBM_M6cxx . . $ `scripts/AIGame.cpp:90:9`!, TXT_GBM_M7cxx . . $ `scripts/AIGame.cpp:91:9`!, |
| 1475 | TXT_GBM_ESCORTcxx . . $ `scripts/AIGame.cpp:92:9`!, TXT_GBM_USEEXTINcxx . . $ `scripts/AIGame.cpp:93:9`!, TXT_GBM_WINGNUTcxx . . $ `scripts/AIGame.cpp:94:9`!, TXT_GBM_PILOTPOWERcxx . . $ `scripts/AIGame.cpp:95:9`!, TXT_GBM_GUARDIANcxx . . $ `scripts/AIGame.cpp:96:9`!, |
| 1476 | TXT_GBM_ANTIVIRUScxx . . $ `scripts/AIGame.cpp:97:9`!, TXT_GBM_ALLOWCHATcxx . . $ `scripts/AIGame.cpp:98:9`!, TXT_GBM_DISALLOWCHATcxx . . $ `scripts/AIGame.cpp:99:9`!, TXT_GBM_RETURNTOSHIPcxx . . $ `scripts/AIGame.cpp:100:9`!, |
| 1477 | }; |
| 1478 | |
| 1479 | // Speed is automatic |
| 1480 | #define NUM_GB_USABLE_POWERUPScxx . . $ `scripts/AIGame.cpp:1480:9`! 5 |
| 1481 | #define NUM_GB_POWERUPScxx . . $ `scripts/AIGame.cpp:1481:9`! 6 |
| 1482 | #define GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`! GBC_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1457:9`! |
| 1483 | |
| 1484 | #define MAX_AV_ROBOTScxx . . $ `scripts/AIGame.cpp:1484:9`! 100 |
| 1485 | |
| 1486 | static int gb_pow_textcxx . . $ gb_pow_text.[NUM_GB_POWERUPScxx . . $ `scripts/AIGame.cpp:1481:9`!] = {TXT_GBP_PUTOUTFIREcxx . . $ `scripts/AIGame.cpp:153:9`!, TXT_GBP_COWABUNGAcxx . . $ `scripts/AIGame.cpp:154:9`!, TXT_GBP_BEGENTALcxx . . $ `scripts/AIGame.cpp:155:9`!, |
| 1487 | TXT_GBP_LETSDOITcxx . . $ `scripts/AIGame.cpp:156:9`!, TXT_GBP_CONVERTENcxx . . $ `scripts/AIGame.cpp:157:9`!, TXT_GBP_ACCELERATORcxx . . $ `scripts/AIGame.cpp:158:9`!}; |
| 1488 | |
| 1489 | static int gb_pow_not_textcxx . . $ gb_pow_not_text.[NUM_GB_POWERUPScxx . . $ `scripts/AIGame.cpp:1481:9`!] = {TXT_GBPN_NOFIREcxx . . $ `scripts/AIGame.cpp:159:9`!, TXT_GBPN_NOFIGHTcxx . . $ `scripts/AIGame.cpp:160:9`!, TXT_GBPN_GOPLAYcxx . . $ `scripts/AIGame.cpp:161:9`!, |
| 1490 | TXT_GBPN_TOODISSYcxx . . $ `scripts/AIGame.cpp:162:9`!, TXT_GBPN_NOENEMYcxx . . $ `scripts/AIGame.cpp:163:9`!, TXT_GBPN_NOCOFFEEcxx . . $ `scripts/AIGame.cpp:164:9`!}; |
| 1491 | |
| 1492 | static int gb_pow_pickup_textcxx . . $ gb_pow_pickup_text.[NUM_GB_POWERUPScxx . . $ `scripts/AIGame.cpp:1481:9`!] = {TXT_GBPP_EXTINcxx . . $ `scripts/AIGame.cpp:165:9`!, TXT_GBPP_WINGNUTcxx . . $ `scripts/AIGame.cpp:166:9`!, TXT_GBPP_MANCONcxx . . $ `scripts/AIGame.cpp:167:9`!, |
| 1493 | TXT_GBPP_GUARDcxx . . $ `scripts/AIGame.cpp:168:9`!, TXT_GBPP_ANTIVcxx . . $ `scripts/AIGame.cpp:169:9`!, TXT_GBPP_ACCELcxx . . $ `scripts/AIGame.cpp:170:9`!}; |
| 1494 | |
| 1495 | #define GB_POW_FIREcxx . . $ `scripts/AIGame.cpp:1495:9`! 0 |
| 1496 | #define GB_POW_WINGNUTcxx . . $ `scripts/AIGame.cpp:1496:9`! 1 |
| 1497 | #define GB_POW_MANUALcxx . . $ `scripts/AIGame.cpp:1497:9`! 2 |
| 1498 | #define GB_POW_RTYPEcxx . . $ `scripts/AIGame.cpp:1498:9`! 3 |
| 1499 | #define GB_POW_ANTIVIRUScxx . . $ `scripts/AIGame.cpp:1499:9`! 4 |
| 1500 | #define GB_POW_SPEEDcxx . . $ `scripts/AIGame.cpp:1500:9`! 5 |
| 1501 | |
| 1502 | #define NUM_GB_SOUNDScxx . . $ `scripts/AIGame.cpp:1502:9`! 5 |
| 1503 | #define GBS_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1503:9`! 0 |
| 1504 | #define GBS_AMBIENTcxx . . $ `scripts/AIGame.cpp:1504:9`! 1 |
| 1505 | |
| 1506 | // Extensions to the command interface |
| 1507 | #define COM_POWERUP_NOTIFYcxx . . $ `scripts/AIGame.cpp:1507:9`! 4 |
| 1508 | #define COM_POWERUP_PICKUPcxx . . $ `scripts/AIGame.cpp:1508:9`! 5 |
| 1509 | |
| 1510 | struct guidebot_datacxx . . $ guidebot_data# { |
| 1511 | char namecxx . . $ guidebot_data#name.[8]; |
| 1512 | char powerupscxx . . $ guidebot_data#powerups.[NUM_GB_USABLE_POWERUPScxx . . $ `scripts/AIGame.cpp:1480:9`!]; |
| 1513 | |
| 1514 | int soundscxx . . $ guidebot_data#sounds.[NUM_GB_SOUNDScxx . . $ `scripts/AIGame.cpp:1502:9`!]; |
| 1515 | |
| 1516 | float mode_timecxx . . $ guidebot_data#mode_time.; |
| 1517 | |
| 1518 | uint16_tcxx . . $ uint16_t# mp_slotcxx . . $ guidebot_data#mp_slot.; // Owner's slot number |
| 1519 | int my_playercxx . . $ guidebot_data#my_player.; // Owner's object reference |
| 1520 | |
| 1521 | bool f_parentedcxx . . $ guidebot_data#f_parented.; // Buddy will not collide with parent until it isn't parented |
| 1522 | bool f_pickupcxx . . $ guidebot_data#f_pickup.; // Marked for pickup by the owner |
| 1523 | |
| 1524 | int modecxx . . $ guidebot_data#mode.; // See above |
| 1525 | int sub_modecxx . . $ guidebot_data#sub_mode.; // See above |
| 1526 | |
| 1527 | char last_rtype_dircxx . . $ guidebot_data#last_rtype_dir.; |
| 1528 | |
| 1529 | int g_powerupcxx . . $ guidebot_data#g_powerup.; |
| 1530 | int num_pgcxx . . $ guidebot_data#num_pg.; |
| 1531 | int num_sgcxx . . $ guidebot_data#num_sg.; |
| 1532 | |
| 1533 | int camera_objcxx . . $ guidebot_data#camera_obj.; |
| 1534 | |
| 1535 | int last_commandcxx . . $ guidebot_data#last_command.; // If negative, there is isn't any command |
| 1536 | float last_at_goal_timecxx . . $ guidebot_data#last_at_goal_time.; |
| 1537 | float next_ambient_timecxx . . $ guidebot_data#next_ambient_time.; // Next time the ambient goal changes |
| 1538 | |
| 1539 | float last_sound_timecxx . . $ guidebot_data#last_sound_time.; |
| 1540 | |
| 1541 | int flagscxx . . $ guidebot_data#flags.; |
| 1542 | |
| 1543 | float last_retreat_timecxx . . $ guidebot_data#last_retreat_time.; |
| 1544 | float return_timecxx . . $ guidebot_data#return_time.; |
| 1545 | |
| 1546 | int mecxx . . $ guidebot_data#me.; |
| 1547 | float last_animcxx . . $ guidebot_data#last_anim.; |
| 1548 | |
| 1549 | int extinguish_spew_idcxx . . $ guidebot_data#extinguish_spew_id.; |
| 1550 | int extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[5]; |
| 1551 | int num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs.; |
| 1552 | float extinguish_obj_timecxx . . $ guidebot_data#extinguish_obj_time.; |
| 1553 | |
| 1554 | float max_acccxx . . $ guidebot_data#max_acc.; |
| 1555 | float max_speedcxx . . $ guidebot_data#max_speed.; |
| 1556 | |
| 1557 | int num_av_robotscxx . . $ guidebot_data#num_av_robots.; |
| 1558 | int av_robot_listcxx . . $ guidebot_data#av_robot_list.[MAX_AV_ROBOTScxx . . $ `scripts/AIGame.cpp:1484:9`!]; |
| 1559 | float av_revert_timecxx . . $ guidebot_data#av_revert_time.[MAX_AV_ROBOTScxx . . $ `scripts/AIGame.cpp:1484:9`!]; |
| 1560 | |
| 1561 | float speed_time_leftcxx . . $ guidebot_data#speed_time_left.; |
| 1562 | |
| 1563 | float time_till_next_pvis_checkcxx . . $ guidebot_data#time_till_next_pvis_check.; |
| 1564 | float time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare.; |
| 1565 | |
| 1566 | int amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle.; |
| 1567 | |
| 1568 | float next_powerup_check_timecxx . . $ guidebot_data#next_powerup_check_time.; |
| 1569 | uint16_tcxx . . $ uint16_t# powerup_idscxx . . $ guidebot_data#powerup_ids.[6]; |
| 1570 | }; |
| 1571 | |
| 1572 | class GuideBotcxx . . $ GuideBot# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1573 | private: |
| 1574 | guidebot_datacxx . . $ guidebot_data# *memorycxx . . $ GuideBot#memory.; |
| 1575 | void DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(const char *str, bool f_high_priority, const char *sound_name = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, bool f_sound_2d = false); |
| 1576 | // void InitPowerup(int me, char pow_id); |
| 1577 | // void DoPowerupFrame(int me); |
| 1578 | void DoPowerupCheckcxx . . $ GuideBot#DoPowerupCheck(d4f767463ce0a6b3).(int me); |
| 1579 | void ReInitAmbientcxx . . $ GuideBot#ReInitAmbient(d4f767463ce0a6b3).(int me); |
| 1580 | bool InitExtinguishcxx . . $ GuideBot#InitExtinguish(efaadfb7dc14930a).(bool f_player_on_fire); |
| 1581 | bool SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(int me, char mode); |
| 1582 | bool SetSubModecxx . . $ GuideBot#SetSubMode(db021eaee9c3e7a9).(int me, char sub_mode, int it = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 1583 | bool DoInitcxx . . $ GuideBot#DoInit(9609253e83e89946).(int me_handle, bool f_reinit); |
| 1584 | void DoCollidecxx . . $ GuideBot#DoCollide(bbb8461685d7aa69).(int me, tOSIRISEVTCOLLIDEcxx . . $ tOSIRISEVTCOLLIDE# *evt_collide); |
| 1585 | bool DoUsecxx . . $ GuideBot#DoUse(83c267b20bac841a).(int me); |
| 1586 | bool DoNotifycxx . . $ GuideBot#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1587 | void DoFramecxx . . $ GuideBot#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 1588 | bool DoExternalCommandscxx . . $ GuideBot#DoExternalCommands(70121a6dc333946f).(int me, gb_comcxx . . $ gb_com# *command, int it); |
| 1589 | int MakeCommandListcxx . . $ GuideBot#MakeCommandList(a5f7824ee4986326).(int *gbc_list); |
| 1590 | void AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(int me); |
| 1591 | |
| 1592 | public: |
| 1593 | GuideBotcxx . . $ GuideBot#GuideBot(49f6e7a06ebc5aa8).() { memorycxx . . $ GuideBot#memory. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; } |
| 1594 | int16_t CallEventcxx . . $ GuideBot#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1595 | }; |
| 1596 | |
| 1597 | //----------------- |
| 1598 | // Thief |
| 1599 | //----------------- |
| 1600 | |
| 1601 | #define THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`! 0 // Roaming the mine |
| 1602 | #define THIEF_TRACK_PLAYERcxx . . $ `scripts/AIGame.cpp:1602:9`! 1 // Getting to the player |
| 1603 | #define THIEF_STEALcxx . . $ `scripts/AIGame.cpp:1603:9`! 2 // Stealing an item (colliding with player) |
| 1604 | #define THIEF_RUN_AWAYcxx . . $ `scripts/AIGame.cpp:1604:9`! 3 // In run-away mode |
| 1605 | #define THIEF_SURRENDERcxx . . $ `scripts/AIGame.cpp:1605:9`! 4 // Surrender and then... |
| 1606 | #define THIEF_TIME_BOMBcxx . . $ `scripts/AIGame.cpp:1606:9`! 5 // Go into bomb mode |
| 1607 | #define THIEF_PLAYER_DEATH_TAUNTcxx . . $ `scripts/AIGame.cpp:1607:9`! 6 // Thief laughing at dead player |
| 1608 | #define THIEF_DEATHcxx . . $ `scripts/AIGame.cpp:1608:9`! 7 // Thief dying |
| 1609 | #define THIEF_KIDNAP_GBcxx . . $ `scripts/AIGame.cpp:1609:9`! 8 // Kipnapping the GB |
| 1610 | #define THIEF_CORNEREDcxx . . $ `scripts/AIGame.cpp:1610:9`! 9 // Cornered behavior |
| 1611 | #define THIEF_ATTACKcxx . . $ `scripts/AIGame.cpp:1611:9`! 10 // Used by SUPER THIEF |
| 1612 | |
| 1613 | #define THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`! 0 // Normal mode of operation |
| 1614 | #define THIEF_SUB_SUMMONcxx . . $ `scripts/AIGame.cpp:1614:9`! 1 // Summon other robots |
| 1615 | #define THIEF_SUB_CLOAKcxx . . $ `scripts/AIGame.cpp:1615:9`! 2 // Cloak effect |
| 1616 | #define THIEF_SUB_THROW_ITEMcxx . . $ `scripts/AIGame.cpp:1616:9`! 3 // Throw an item from your insides(ewww) |
| 1617 | #define THIEF_SUB_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1617:9`! 4 // Pickup a powerup |
| 1618 | #define THIEF_SUB_DROP_POWERUPcxx . . $ `scripts/AIGame.cpp:1618:9`! 5 // Quick anim to drop an externally carried item |
| 1619 | |
| 1620 | #define THIEF_F_SURRENDEREDcxx . . $ `scripts/AIGame.cpp:1620:9`! 1 |
| 1621 | #define THIEF_F_GOT_POWERUPcxx . . $ `scripts/AIGame.cpp:1621:9`! 2 |
| 1622 | |
| 1623 | // Chrishack make an "occurance" 2D table SUB vs MODE with float for chance per check interval |
| 1624 | |
| 1625 | #define MAX_STOLEN_OBJScxx . . $ `scripts/AIGame.cpp:1625:9`! 5 |
| 1626 | #define MAX_STOLEN_INVcxx . . $ `scripts/AIGame.cpp:1626:9`! 10 |
| 1627 | |
| 1628 | #define THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`! 0 |
| 1629 | #define THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`! 1 |
| 1630 | #define THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`! 2 |
| 1631 | struct tThiefItemscxx . . $ tThiefItems# { |
| 1632 | int indexcxx . . $ tThiefItems#index., typecxx . . $ tThiefItems#type.; |
| 1633 | float attempt_onecxx . . $ tThiefItems#attempt_one., attempt_twocxx . . $ tThiefItems#attempt_two., attempt_two_no_onecxx . . $ tThiefItems#attempt_two_no_one.; |
| 1634 | int name_idxcxx . . $ tThiefItems#name_idx.; |
| 1635 | }; |
| 1636 | |
| 1637 | static tThiefItemscxx . . $ tThiefItems# ThiefableItemscxx . . $ ThiefableItems.[] = { |
| 1638 | {0, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_LASERScxx . . $ `scripts/AIGame.cpp:171:9`!}, // Laser |
| 1639 | {1, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_VAUSScxx . . $ `scripts/AIGame.cpp:172:9`!}, // Vauss |
| 1640 | {2, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_MICROWAVEcxx . . $ `scripts/AIGame.cpp:173:9`!}, // Microwave |
| 1641 | {3, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_PLASMAcxx . . $ `scripts/AIGame.cpp:174:9`!}, // Plasma |
| 1642 | {4, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_FUSIONcxx . . $ `scripts/AIGame.cpp:175:9`!}, // Fusion |
| 1643 | {5, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_SUPERcxx . . $ `scripts/AIGame.cpp:176:9`!}, // SuperLaser |
| 1644 | {6, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_MASScxx . . $ `scripts/AIGame.cpp:177:9`!}, // Mass Driver |
| 1645 | {7, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_NAPALMcxx . . $ `scripts/AIGame.cpp:178:9`!}, // Napalm |
| 1646 | {8, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_EMDcxx . . $ `scripts/AIGame.cpp:179:9`!}, // EMD Gun |
| 1647 | {9, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 0.70f, 0.50f, 0.70f, TXT_WEAP_OMEGAcxx . . $ `scripts/AIGame.cpp:180:9`!}, // Omega |
| 1648 | |
| 1649 | {10, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.50f, 0.00f, 0.90f, TXT_WEAP_CONCUSSIONcxx . . $ `scripts/AIGame.cpp:181:9`!}, // Concussion |
| 1650 | {11, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.60f, 0.00f, 0.90f, TXT_WEAP_HOMINGcxx . . $ `scripts/AIGame.cpp:182:9`!}, // Homing |
| 1651 | {12, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.70f, 0.00f, 0.90f, TXT_WEAP_IMPACTcxx . . $ `scripts/AIGame.cpp:183:9`!}, // Impact Mortar |
| 1652 | {13, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.80f, 0.00f, 0.90f, TXT_WEAP_SMARTcxx . . $ `scripts/AIGame.cpp:184:9`!}, // Smart |
| 1653 | {14, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.90f, 0.00f, 0.90f, TXT_WEAP_MEGAcxx . . $ `scripts/AIGame.cpp:185:9`!}, // Mega |
| 1654 | {15, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.50f, 0.00f, 0.90f, TXT_WEAP_FRAGcxx . . $ `scripts/AIGame.cpp:186:9`!}, // Frag |
| 1655 | {16, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.60f, 0.00f, 0.90f, TXT_WEAP_GUIDEDcxx . . $ `scripts/AIGame.cpp:187:9`!}, // Guided |
| 1656 | {17, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.70f, 0.00f, 0.90f, TXT_WEAP_NAPALMRcxx . . $ `scripts/AIGame.cpp:188:9`!}, // Napalm Rocket |
| 1657 | {18, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.80f, 0.00f, 0.90f, TXT_WEAP_CYCLONEcxx . . $ `scripts/AIGame.cpp:189:9`!}, // Cyclone |
| 1658 | {19, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, 0.90f, 0.00f, 0.90f, TXT_WEAP_BLACKSHARKcxx . . $ `scripts/AIGame.cpp:190:9`!}, // Black Shark |
| 1659 | |
| 1660 | {1, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 0.20f, 0.20f, 0.20f, TXT_WEAP_AUTOMAPcxx . . $ `scripts/AIGame.cpp:191:9`!}, // Automap |
| 1661 | {2, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 0.0f, 0.20f, 0.20f, TXT_WEAP_HEADLIGHTcxx . . $ `scripts/AIGame.cpp:192:9`!}, // Headlight |
| 1662 | {3, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 0.80f, 0.40f, 0.80f, TXT_WEAP_ETSCONVERTERcxx . . $ `scripts/AIGame.cpp:193:9`!}, // E2S Converter |
| 1663 | {4, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 1.00f, 0.60f, 1.00f, TXT_WEAP_CLOAKcxx . . $ `scripts/AIGame.cpp:194:9`!}, // Cloak |
| 1664 | {5, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 1.00f, 0.60f, 1.00f, TXT_WEAP_INVULNERABILITYcxx . . $ `scripts/AIGame.cpp:195:9`!}, // Invuln |
| 1665 | {6, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 1.00f, 0.60f, 1.00f, TXT_WEAP_RAPIDFIREcxx . . $ `scripts/AIGame.cpp:196:9`!}, // RapidFire |
| 1666 | {7, THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!, 1.00f, 0.60f, 1.00f, TXT_WEAP_QUADLASERScxx . . $ `scripts/AIGame.cpp:197:9`!}, // Quads |
| 1667 | }; |
| 1668 | static int numThiefableItemscxx . . $ numThiefableItems. = sizeof(ThiefableItemscxx . . $ ThiefableItems.) / sizeof(tThiefItemscxx . . $ tThiefItems#); |
| 1669 | |
| 1670 | struct inv_itemcxx . . $ inv_item# { |
| 1671 | uint16_tcxx . . $ uint16_t# idcxx . . $ inv_item#id.; |
| 1672 | int ownercxx . . $ inv_item#owner.; |
| 1673 | }; // not really inventory items, but items such as quads, automap, headlight, etc (non-weapons) |
| 1674 | |
| 1675 | struct thief_datacxx . . $ thief_data# { |
| 1676 | char modecxx . . $ thief_data#mode.; |
| 1677 | char sub_modecxx . . $ thief_data#sub_mode.; |
| 1678 | char last_special_sub_modecxx . . $ thief_data#last_special_sub_mode.; |
| 1679 | |
| 1680 | char flagscxx . . $ thief_data#flags.; |
| 1681 | |
| 1682 | char f_cloakedcxx . . $ thief_data#f_cloaked.; |
| 1683 | char f_see_playercxx . . $ thief_data#f_see_player.; |
| 1684 | |
| 1685 | float sub_mode_timecxx . . $ thief_data#sub_mode_time.; |
| 1686 | float mode_timecxx . . $ thief_data#mode_time.; |
| 1687 | float next_test_timecxx . . $ thief_data#next_test_time.; |
| 1688 | float last_framecxx . . $ thief_data#last_frame.; |
| 1689 | int bomb_handlecxx . . $ thief_data#bomb_handle.; |
| 1690 | float last_summon_timecxx . . $ thief_data#last_summon_time.; |
| 1691 | |
| 1692 | float last_shieldscxx . . $ thief_data#last_shields.; |
| 1693 | |
| 1694 | int num_stolen_objscxx . . $ thief_data#num_stolen_objs.; |
| 1695 | int stolen_objscxx . . $ thief_data#stolen_objs.[MAX_STOLEN_OBJScxx . . $ `scripts/AIGame.cpp:1625:9`!]; |
| 1696 | |
| 1697 | int num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.; |
| 1698 | weapon_itemcxx . . $ weapon_item# stolen_weaponscxx . . $ thief_data#stolen_weapons.[MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`!]; |
| 1699 | |
| 1700 | int num_stolen_invcxx . . $ thief_data#num_stolen_inv.; |
| 1701 | inv_itemcxx . . $ inv_item# stolen_invcxx . . $ thief_data#stolen_inv.[MAX_STOLEN_INVcxx . . $ `scripts/AIGame.cpp:1626:9`!]; |
| 1702 | |
| 1703 | float fearcxx . . $ thief_data#fear.; |
| 1704 | float agressioncxx . . $ thief_data#agression.; |
| 1705 | |
| 1706 | }; |
| 1707 | |
| 1708 | class Thiefcxx . . $ Thief# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 1709 | private: |
| 1710 | thief_datacxx . . $ thief_data# *memorycxx . . $ Thief#memory.; |
| 1711 | void DoMessagecxx . . $ Thief#DoMessage(85c52e162fed56f9).(const char *str); |
| 1712 | |
| 1713 | void SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(int me, int mode); |
| 1714 | void SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(int me, int submode); |
| 1715 | |
| 1716 | void SpewEverythingcxx . . $ Thief#SpewEverything(d4f767463ce0a6b3).(int me); |
| 1717 | void DoAttackcxx . . $ Thief#DoAttack(3e454b8ccf442868).(int me, int it); |
| 1718 | bool DoStealcxx . . $ Thief#DoSteal(54454554f05f9a4a).(int me, int it, int attempt_num, bool f_last_success); |
| 1719 | void DoKidnapcxx . . $ Thief#DoKidnap(3e454b8ccf442868).(int me, int it); |
| 1720 | |
| 1721 | void DoInitcxx . . $ Thief#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 1722 | void DoCollidecxx . . $ Thief#DoCollide(bbb8461685d7aa69).(int me, tOSIRISEVTCOLLIDEcxx . . $ tOSIRISEVTCOLLIDE# *evt_collide); |
| 1723 | bool DoNotifycxx . . $ Thief#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 1724 | void DoDestroycxx . . $ Thief#DoDestroy(2e83fcfe4732ba14).(int me, tOSIRISEVTDESTROYcxx . . $ tOSIRISEVTDESTROY# *evt_destroy); |
| 1725 | void DoFramecxx . . $ Thief#DoFrame(d4f767463ce0a6b3).(int me); |
| 1726 | void DoSubModeFramecxx . . $ Thief#DoSubModeFrame(d4f767463ce0a6b3).(int me); |
| 1727 | |
| 1728 | public: |
| 1729 | Thiefcxx . . $ Thief#Thief(49f6e7a06ebc5aa8).() {} |
| 1730 | int16_t CallEventcxx . . $ Thief#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 1731 | }; |
| 1732 | |
| 1733 | //----------------- |
| 1734 | // SuperThief |
| 1735 | //----------------- |
| 1736 | |
| 1737 | struct tSuperThiefItemscxx . . $ tSuperThiefItems# { |
| 1738 | int indexcxx . . $ tSuperThiefItems#index., autoselectcxx . . $ tSuperThiefItems#autoselect., typecxx . . $ tSuperThiefItems#type.; |
| 1739 | float fire_delaycxx . . $ tSuperThiefItems#fire_delay.; |
| 1740 | int name_idxcxx . . $ tSuperThiefItems#name_idx.; |
| 1741 | const char *weapon_namecxx . . $ tSuperThiefItems#weapon_name.; |
| 1742 | const char *fire_soundcxx . . $ tSuperThiefItems#fire_sound.; |
| 1743 | }; |
| 1744 | |
| 1745 | static tSuperThiefItemscxx . . $ tSuperThiefItems# SuperThiefableItemscxx . . $ SuperThiefableItems.[] = { |
| 1746 | {0, -1, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .25, TXT_WEAP_LASERScxx . . $ `scripts/AIGame.cpp:171:9`!, "", ""}, // Laser |
| 1747 | {1, 4, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .1f, TXT_WEAP_VAUSScxx . . $ `scripts/AIGame.cpp:172:9`!, "Vauss", "WpnPyroGLVaussSidefire"}, // Vauss |
| 1748 | {2, 2, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .1f, TXT_WEAP_MICROWAVEcxx . . $ `scripts/AIGame.cpp:173:9`!, "Raygun", "WpnPyroGLMicrowaveSide"}, // Microwave |
| 1749 | {3, 3, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .15f, TXT_WEAP_PLASMAcxx . . $ `scripts/AIGame.cpp:174:9`!, "Plasma", "WpnPyroGLPlasmaFire"}, // Plasma |
| 1750 | {4, 5, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .8f, TXT_WEAP_FUSIONcxx . . $ `scripts/AIGame.cpp:175:9`!, "Fusion", "WpnPyroGLFusionFire"}, // Fusion |
| 1751 | {5, 6, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .25f, TXT_WEAP_SUPERcxx . . $ `scripts/AIGame.cpp:176:9`!, "Laser Level 5 -Yellow", "WpnPyroGLSuperLaser"}, // SuperLaser |
| 1752 | {6, 7, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 1.0f, TXT_WEAP_MASScxx . . $ `scripts/AIGame.cpp:177:9`!, "Mass Driver", "WpnPyroGLMDriverFire"}, // Mass Driver |
| 1753 | {7, -1, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 1.0f, TXT_WEAP_NAPALMcxx . . $ `scripts/AIGame.cpp:178:9`!, "", ""}, // Napalm |
| 1754 | {8, 1, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, .2f, TXT_WEAP_EMDcxx . . $ `scripts/AIGame.cpp:179:9`!, "EMDblob", "WpnPyroGLEMDfire"}, // EMD Gun |
| 1755 | {9, -1, THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!, 1.0f, TXT_WEAP_OMEGAcxx . . $ `scripts/AIGame.cpp:180:9`!, "", ""}, // Omega |
| 1756 | |
| 1757 | {10, 1, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_CONCUSSIONcxx . . $ `scripts/AIGame.cpp:181:9`!, "Concussion", "concmissilefire71"}, // Concussion |
| 1758 | {11, 2, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_HOMINGcxx . . $ `scripts/AIGame.cpp:182:9`!, "homing", "HomingfireB1"}, // Homing |
| 1759 | {12, -1, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_IMPACTcxx . . $ `scripts/AIGame.cpp:183:9`!, "Impact Mortar", "Drop weapon"}, // Impact Mortar |
| 1760 | {13, 3, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_SMARTcxx . . $ `scripts/AIGame.cpp:184:9`!, "Smart", "Smartfire1"}, // Smart |
| 1761 | {14, 8, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_MEGAcxx . . $ `scripts/AIGame.cpp:185:9`!, "Mega", "Mega missile fire"}, // Mega |
| 1762 | {15, 6, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_FRAGcxx . . $ `scripts/AIGame.cpp:186:9`!, "Frag", "WpnFragFire"}, // Frag |
| 1763 | {16, 4, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_GUIDEDcxx . . $ `scripts/AIGame.cpp:187:9`!, "Guided", "Guided31"}, // Guided |
| 1764 | {17, 5, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_NAPALMRcxx . . $ `scripts/AIGame.cpp:188:9`!, "NapalmRocket", "napalmrocket31"}, // Napalm Rocket |
| 1765 | {18, 7, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_CYCLONEcxx . . $ `scripts/AIGame.cpp:189:9`!, "Cyclone Pack", "CycloneFire1"}, // Cyclone |
| 1766 | {19, -1, THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!, .2f, TXT_WEAP_BLACKSHARKcxx . . $ `scripts/AIGame.cpp:190:9`!, "", ""}, // Black Shark |
| 1767 | }; |
| 1768 | |
| 1769 | static int numSuperThiefableItemscxx . . $ numSuperThiefableItems. = sizeof(SuperThiefableItemscxx . . $ SuperThiefableItems.) / sizeof(tSuperThiefItemscxx . . $ tSuperThiefItems#); |
| 1770 | |
| 1771 | #define SUPERTHIEF_MELEE_DISTcxx . . $ `scripts/AIGame.cpp:1771:9`! 50.0f |
| 1772 | |
| 1773 | void SuperThiefcxx . . $ SuperThief#::SetModecxx . . $ SuperThief#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 1774 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 1775 | |
| 1776 | switch (mode) { |
| 1777 | case SUPERTHIEF_WAITcxx . . $ `scripts/AIGame.cpp:413:9`!: { |
| 1778 | } break; |
| 1779 | |
| 1780 | case SUPERTHIEF_INTROcxx . . $ `scripts/AIGame.cpp:414:9`!: { |
| 1781 | } break; |
| 1782 | case SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!: |
| 1783 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 1784 | break; |
| 1785 | case SUPERTHIEF_MELEEcxx . . $ `scripts/AIGame.cpp:411:9`!: |
| 1786 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 1787 | break; |
| 1788 | case SUPERTHIEF_DEATHcxx . . $ `scripts/AIGame.cpp:412:9`!: { |
| 1789 | int flags = AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; |
| 1790 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 1791 | |
| 1792 | flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 1793 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 1794 | |
| 1795 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, me); |
| 1796 | |
| 1797 | float temp = 0.0f; |
| 1798 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_TURN_RATEcxx . . $ `scripts/osiris_common.h:507:9`!, &temp); |
| 1799 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 246.0f, 292.0f, 6.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefDeath"), -1); |
| 1800 | } break; |
| 1801 | } |
| 1802 | |
| 1803 | memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. = 1.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 1804 | memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. = mode; |
| 1805 | memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. = 0.0f; |
| 1806 | } |
| 1807 | |
| 1808 | void SuperThiefcxx . . $ SuperThief#::SpewEverythingcxx . . $ SuperThief#SpewEverything(d4f767463ce0a6b3).(int me) { |
| 1809 | int i; |
| 1810 | int powerup_handle; |
| 1811 | int room; |
| 1812 | vectorcxx . . $ vector# pos; |
| 1813 | |
| 1814 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 1815 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 1816 | |
| 1817 | for (i = 0; i < memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.; i++) { |
| 1818 | uint16_tcxx . . $ uint16_t# id; |
| 1819 | int j; |
| 1820 | |
| 1821 | for (j = 0; j < memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].amountcxx . . $ weapon_item#amount.; j++) { |
| 1822 | float speed = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 20.0f + 5.0f; |
| 1823 | vectorcxx . . $ vector# dir; |
| 1824 | |
| 1825 | dir.xcxx . . $ vector#x. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 1826 | dir.ycxx . . $ vector#y. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 1827 | dir.zcxx . . $ vector#z. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 1828 | |
| 1829 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir); |
| 1830 | dir *=cxx . . $ `operator*=`(f132838b2cd11d6). speed; |
| 1831 | |
| 1832 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].ownercxx . . $ weapon_item#owner., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_US_WEAPON_POWERUP_IDcxx . . $ `scripts/osiris_common.h:469:9`!, &id, |
| 1833 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.); |
| 1834 | powerup_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &dir); |
| 1835 | } |
| 1836 | |
| 1837 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].amountcxx . . $ weapon_item#amount. = 0; |
| 1838 | } |
| 1839 | } |
| 1840 | |
| 1841 | bool SuperThiefcxx . . $ SuperThief#::DoNotifycxx . . $ SuperThief#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 1842 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MELEE_HITcxx . . $ `Descent3/aistruct_external.h:308:9`!) { |
| 1843 | int target_handle; |
| 1844 | int target_type; |
| 1845 | |
| 1846 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 1847 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &target_type); |
| 1848 | |
| 1849 | if (target_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 1850 | bool f_success; |
| 1851 | |
| 1852 | memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. = 1.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 1853 | f_success = DoStealcxx . . $ SuperThief#DoSteal(cf9ef193275fa6d8).(me, target_handle); |
| 1854 | } |
| 1855 | } |
| 1856 | |
| 1857 | switch (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode.) { |
| 1858 | case SUPERTHIEF_WAITcxx . . $ `scripts/AIGame.cpp:413:9`!: { |
| 1859 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_STARTcxx . . $ `Descent3/aistruct_external.h:312:9`!) { |
| 1860 | SetModecxx . . $ SuperThief#SetMode(5016a63d0a5aceb0).(me, SUPERTHIEF_INTROcxx . . $ `scripts/AIGame.cpp:414:9`!); |
| 1861 | } |
| 1862 | } break; |
| 1863 | |
| 1864 | case SUPERTHIEF_INTROcxx . . $ `scripts/AIGame.cpp:414:9`!: { |
| 1865 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!) { |
| 1866 | SetModecxx . . $ SuperThief#SetMode(5016a63d0a5aceb0).(me, SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!); |
| 1867 | } |
| 1868 | } |
| 1869 | } |
| 1870 | |
| 1871 | return true; |
| 1872 | } |
| 1873 | |
| 1874 | bool SuperThiefcxx . . $ SuperThief#::DoStealcxx . . $ SuperThief#DoSteal(cf9ef193275fa6d8).(int me, int it) { |
| 1875 | int max_tries = numSuperThiefableItemscxx . . $ numSuperThiefableItems.; |
| 1876 | float gen_perc, perc_chance; |
| 1877 | ; |
| 1878 | int i; |
| 1879 | int count_max, count_num; |
| 1880 | bool *attempted_steals; |
| 1881 | |
| 1882 | attempted_steals = (bool *)malloccxx . . $ malloc(9f008b2a9698428b).(numSuperThiefableItemscxx . . $ numSuperThiefableItems. * sizeof(bool)); |
| 1883 | if (!attempted_steals) |
| 1884 | return false; |
| 1885 | |
| 1886 | float ftime = Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1887 | if (ftime == 0) |
| 1888 | ftime = 1.0f; |
| 1889 | srandcxx . . $ srand(6bab9b75950d6f3).(Game_GetTimecxx . . $ Game_GetTime.() / ftime); |
| 1890 | |
| 1891 | for (i = 0; i < numSuperThiefableItemscxx . . $ numSuperThiefableItems.; i++) { |
| 1892 | attempted_steals[i] = false; |
| 1893 | } |
| 1894 | |
| 1895 | while (max_tries--) { |
| 1896 | i = randcxx . . $ rand(9efc7249d839d30e).() % numSuperThiefableItemscxx . . $ numSuperThiefableItems.; |
| 1897 | |
| 1898 | if (attempted_steals[i]) { |
| 1899 | // we already tried this one, try another |
| 1900 | max_tries++; |
| 1901 | continue; |
| 1902 | } |
| 1903 | |
| 1904 | attempted_steals[i] = true; |
| 1905 | |
| 1906 | { |
| 1907 | count_max = MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`!; |
| 1908 | count_num = memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.; |
| 1909 | |
| 1910 | if (count_num >= count_max) { |
| 1911 | mprintfcxx . . $ mprintf.(0, "SUPER THIEF: no mo' room\n"); |
| 1912 | continue; // we have no more room |
| 1913 | } |
| 1914 | |
| 1915 | // mprintf(0,"THIEF: Checking %s\n",TXT(SuperThiefableItems[i].name_idx)); |
| 1916 | |
| 1917 | bool can_take = false; |
| 1918 | int amount = 0; |
| 1919 | char message[256]; |
| 1920 | |
| 1921 | switch (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].typecxx . . $ tSuperThiefItems#type.) { |
| 1922 | case THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!: |
| 1923 | // check to see if we can steal the primary |
| 1924 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 1925 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index. != 0 && amount) { |
| 1926 | can_take = true; |
| 1927 | snprintf(message, sizeof(message), TXT_THIEFSTEALcxx . . $ `scripts/AIGame.cpp:147:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 1928 | } |
| 1929 | break; |
| 1930 | |
| 1931 | case THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!: |
| 1932 | // check to see if we can steal the secondary |
| 1933 | { |
| 1934 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 1935 | |
| 1936 | if (amount) { |
| 1937 | int max; |
| 1938 | |
| 1939 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index. > 14) { |
| 1940 | // 2nd selection group (black shark, etc) |
| 1941 | max = (19 - SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.) / 2.5f + 1; |
| 1942 | } else { |
| 1943 | // 1st selection group (mega, etc) |
| 1944 | max = (14 - SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.) / 2.5f + 1; |
| 1945 | } |
| 1946 | |
| 1947 | int new_amount = (randcxx . . $ rand(9efc7249d839d30e).() / (float)(RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 1)) * max + 1; |
| 1948 | |
| 1949 | if (new_amount < amount) |
| 1950 | amount = new_amount; |
| 1951 | |
| 1952 | can_take = true; |
| 1953 | |
| 1954 | if (amount == 1) { |
| 1955 | snprintf(message, sizeof(message), TXT_STHIEFSTEALcxx . . $ `scripts/AIGame.cpp:151:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 1956 | } else { |
| 1957 | snprintf(message, sizeof(message), TXT_STHIEFSTEAL2cxx . . $ `scripts/AIGame.cpp:152:9`!, amount, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 1958 | } |
| 1959 | } |
| 1960 | } |
| 1961 | break; |
| 1962 | } |
| 1963 | |
| 1964 | if (!can_take) |
| 1965 | continue; |
| 1966 | |
| 1967 | mprintfcxx . . $ mprintf.(0, "Super Thief: Nice %s!\n", TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 1968 | |
| 1969 | Player_AddHudMessagecxx . . $ Player_AddHudMessage.(it, message); |
| 1970 | if (randcxx . . $ rand(9efc7249d839d30e).() % 50) { |
| 1971 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefHehHehHeh")); |
| 1972 | } else { |
| 1973 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefLaugh")); |
| 1974 | } |
| 1975 | |
| 1976 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.].indexcxx . . $ weapon_item#index. = SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.; |
| 1977 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.].ownercxx . . $ weapon_item#owner. = it; |
| 1978 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.].amountcxx . . $ weapon_item#amount. = amount; |
| 1979 | memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.++; |
| 1980 | |
| 1981 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].typecxx . . $ tSuperThiefItems#type. == THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!) { |
| 1982 | amount = 0; |
| 1983 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].autoselectcxx . . $ tSuperThiefItems#autoselect. > memorycxx . . $ SuperThief#memory.->cur_weaponcxx . . $ superthief_data#cur_weapon.) { |
| 1984 | uint16_tcxx . . $ uint16_t# wpn = Wpn_FindIDcxx . . $ Wpn_FindID.(SuperThiefableItemscxx . . $ SuperThiefableItems.[i].weapon_namecxx . . $ tSuperThiefItems#weapon_name.); |
| 1985 | int snd = Sound_FindIdcxx . . $ Sound_FindId.(SuperThiefableItemscxx . . $ SuperThiefableItems.[i].fire_soundcxx . . $ tSuperThiefItems#fire_sound.); |
| 1986 | |
| 1987 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_I_FIRE_SOUNDcxx . . $ `scripts/osiris_common.h:671:9`!, &snd, 0); |
| 1988 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!, &SuperThiefableItemscxx . . $ SuperThiefableItems.[i].fire_delaycxx . . $ tSuperThiefItems#fire_delay., 0); |
| 1989 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_US_GUNPT_WEAPON_IDcxx . . $ `scripts/osiris_common.h:665:9`!, &wpn, 0); |
| 1990 | |
| 1991 | strcpy(memorycxx . . $ SuperThief#memory.->weaponcxx . . $ superthief_data#weapon., SuperThiefableItemscxx . . $ SuperThiefableItems.[i].weapon_namecxx . . $ tSuperThiefItems#weapon_name.); |
| 1992 | strcpy(memorycxx . . $ SuperThief#memory.->soundcxx . . $ superthief_data#sound., SuperThiefableItemscxx . . $ SuperThiefableItems.[i].weapon_namecxx . . $ tSuperThiefItems#weapon_name.); |
| 1993 | memorycxx . . $ SuperThief#memory.->latencycxx . . $ superthief_data#latency. = SuperThiefableItemscxx . . $ SuperThiefableItems.[i].fire_delaycxx . . $ tSuperThiefItems#fire_delay.; |
| 1994 | } |
| 1995 | } else { |
| 1996 | amount *= -1; |
| 1997 | } |
| 1998 | |
| 1999 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 2000 | |
| 2001 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 2002 | return true; |
| 2003 | } |
| 2004 | } |
| 2005 | |
| 2006 | mprintfcxx . . $ mprintf.(0, "Super Thief: Not taking anything\n"); |
| 2007 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 2008 | return false; // we didn't take anything this try |
| 2009 | } |
| 2010 | |
| 2011 | void SuperThiefcxx . . $ SuperThief#::DoInitcxx . . $ SuperThief#DoInit(d4f767463ce0a6b3).(int me) { |
| 2012 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 2013 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 2014 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(superthief_datacxx . . $ superthief_data#); |
| 2015 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 2016 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 2017 | |
| 2018 | memorycxx . . $ SuperThief#memory. = (superthief_datacxx . . $ superthief_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 2019 | |
| 2020 | msafe_structcxx . . $ msafe_struct# m; |
| 2021 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 2022 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 2023 | |
| 2024 | memorycxx . . $ SuperThief#memory.->next_mode_timecxx . . $ superthief_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f + 3.0f; |
| 2025 | memorycxx . . $ SuperThief#memory.->force_ranged_shieldscxx . . $ superthief_data#force_ranged_shields. = m.shieldscxx . . $ msafe_struct#shields. / 15.0f; |
| 2026 | memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. = SUPERTHIEF_WAITcxx . . $ `scripts/AIGame.cpp:413:9`!; |
| 2027 | memorycxx . . $ SuperThief#memory.->f_very_hurtcxx . . $ superthief_data#f_very_hurt. = 0; |
| 2028 | |
| 2029 | memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons. = 0; |
| 2030 | memorycxx . . $ SuperThief#memory.->cur_weaponcxx . . $ superthief_data#cur_weapon. = -1; |
| 2031 | |
| 2032 | memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. = 0.0f; |
| 2033 | memorycxx . . $ SuperThief#memory.->last_framecxx . . $ superthief_data#last_frame. = 0.0f; |
| 2034 | memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. = 1.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 2035 | |
| 2036 | memorycxx . . $ SuperThief#memory.->laser_objcxx . . $ superthief_data#laser_obj. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "STEmitter", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2, 0, true, true); |
| 2037 | |
| 2038 | uint16_tcxx . . $ uint16_t# wpn = Wpn_FindIDcxx . . $ Wpn_FindID.("Laser Level 1 - Red"); |
| 2039 | int snd = Sound_FindIdcxx . . $ Sound_FindId.("Laser level 1"); |
| 2040 | |
| 2041 | strcpy(memorycxx . . $ SuperThief#memory.->weaponcxx . . $ superthief_data#weapon., "Laser Level 1 - Red"); |
| 2042 | strcpy(memorycxx . . $ SuperThief#memory.->soundcxx . . $ superthief_data#sound., "Laser level 1"); |
| 2043 | |
| 2044 | memorycxx . . $ SuperThief#memory.->latencycxx . . $ superthief_data#latency. = 0.25f; |
| 2045 | |
| 2046 | memorycxx . . $ SuperThief#memory.->laser_oncxx . . $ superthief_data#laser_on. = false; |
| 2047 | |
| 2048 | memorycxx . . $ SuperThief#memory.->next_fire_flare_timecxx . . $ superthief_data#next_fire_flare_time. = 0.0f; |
| 2049 | memorycxx . . $ SuperThief#memory.->flare_fire_indexcxx . . $ superthief_data#flare_fire_index. = 0; |
| 2050 | |
| 2051 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_I_FIRE_SOUNDcxx . . $ `scripts/osiris_common.h:671:9`!, &snd, 0); |
| 2052 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!, &memorycxx . . $ SuperThief#memory.->latencycxx . . $ superthief_data#latency., 0); |
| 2053 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_US_GUNPT_WEAPON_IDcxx . . $ `scripts/osiris_common.h:665:9`!, &wpn, 0); |
| 2054 | } |
| 2055 | |
| 2056 | void SuperThiefcxx . . $ SuperThief#::FireFlarecxx . . $ SuperThief#FireFlare(d4f767463ce0a6b3).(int me) { |
| 2057 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2058 | |
| 2059 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 2060 | mstruct.indexcxx . . $ msafe_struct#index. = Wpn_FindIDcxx . . $ Wpn_FindID.("Yellow flare"); |
| 2061 | if (mstruct.indexcxx . . $ msafe_struct#index. == -1) |
| 2062 | return; |
| 2063 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = 1; |
| 2064 | |
| 2065 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("Flare")); |
| 2066 | |
| 2067 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_FIRE_WEAPONcxx . . $ `scripts/osiris_common.h:857:9`!, &mstruct); |
| 2068 | } |
| 2069 | |
| 2070 | void SuperThiefcxx . . $ SuperThief#::CheckAndFireSecondarycxx . . $ SuperThief#CheckAndFireSecondary(d4f767463ce0a6b3).(int me) { |
| 2071 | int i; |
| 2072 | const char *wname; |
| 2073 | const char *sname; |
| 2074 | int best_select = -1; |
| 2075 | int best_index; |
| 2076 | |
| 2077 | for (i = 0; i < memorycxx . . $ SuperThief#memory.->num_stolen_weaponscxx . . $ superthief_data#num_stolen_weapons.; i++) { |
| 2078 | if (memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].amountcxx . . $ weapon_item#amount. > 0 && |
| 2079 | SuperThiefableItemscxx . . $ SuperThiefableItems.[memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.].typecxx . . $ tSuperThiefItems#type. == THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!) { |
| 2080 | if (best_select < SuperThiefableItemscxx . . $ SuperThiefableItems.[memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.].autoselectcxx . . $ tSuperThiefItems#autoselect.) { |
| 2081 | wname = SuperThiefableItemscxx . . $ SuperThiefableItems.[memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.].weapon_namecxx . . $ tSuperThiefItems#weapon_name.; |
| 2082 | sname = SuperThiefableItemscxx . . $ SuperThiefableItems.[memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.].fire_soundcxx . . $ tSuperThiefItems#fire_sound.; |
| 2083 | best_select = SuperThiefableItemscxx . . $ SuperThiefableItems.[memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.].autoselectcxx . . $ tSuperThiefItems#autoselect.; |
| 2084 | best_index = i; |
| 2085 | } |
| 2086 | } |
| 2087 | } |
| 2088 | |
| 2089 | if (best_select >= 0) { |
| 2090 | memorycxx . . $ SuperThief#memory.->stolen_weaponscxx . . $ superthief_data#stolen_weapons.[best_index].amountcxx . . $ weapon_item#amount.--; |
| 2091 | |
| 2092 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2093 | |
| 2094 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 2095 | mstruct.indexcxx . . $ msafe_struct#index. = Wpn_FindIDcxx . . $ Wpn_FindID.(wname); |
| 2096 | if (mstruct.indexcxx . . $ msafe_struct#index. == -1) |
| 2097 | return; |
| 2098 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = 1; |
| 2099 | |
| 2100 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.(sname)); |
| 2101 | |
| 2102 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_FIRE_WEAPONcxx . . $ `scripts/osiris_common.h:857:9`!, &mstruct); |
| 2103 | } |
| 2104 | } |
| 2105 | |
| 2106 | void SuperThiefcxx . . $ SuperThief#::DoIntervalcxx . . $ SuperThief#DoInterval(d4f767463ce0a6b3).(int me) { |
| 2107 | bool f_force_ranged = false; |
| 2108 | int target_handle; |
| 2109 | float anim_frame; |
| 2110 | float shields; |
| 2111 | int flags; |
| 2112 | msafe_structcxx . . $ msafe_struct# m; |
| 2113 | int room; |
| 2114 | vectorcxx . . $ vector# pos; |
| 2115 | |
| 2116 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 2117 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 2118 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &anim_frame); |
| 2119 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 2120 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 2121 | |
| 2122 | if (memorycxx . . $ SuperThief#memory.->laser_oncxx . . $ superthief_data#laser_on.) { |
| 2123 | ray_infocxx . . $ ray_info# ray; |
| 2124 | |
| 2125 | matrixcxx . . $ matrix# orient; |
| 2126 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 2127 | |
| 2128 | // Determine real start pos - room |
| 2129 | vectorcxx . . $ vector# end_pos = pos; |
| 2130 | end_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 2000.0f; |
| 2131 | |
| 2132 | int fvi_flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`!; |
| 2133 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); |
| 2134 | |
| 2135 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &ray.hit_roomcxx . . $ ray_info#hit_room.); |
| 2136 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ray.hit_pointcxx . . $ ray_info#hit_point.); |
| 2137 | } |
| 2138 | |
| 2139 | memorycxx . . $ SuperThief#memory.->f_very_hurtcxx . . $ superthief_data#f_very_hurt. = f_force_ranged = (shields < memorycxx . . $ SuperThief#memory.->force_ranged_shieldscxx . . $ superthief_data#force_ranged_shields.) != 0; |
| 2140 | |
| 2141 | if ((memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. != SUPERTHIEF_DEATHcxx . . $ `scripts/AIGame.cpp:412:9`!) && (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) && anim_frame >= 0.0f && anim_frame <= 6.0f) { |
| 2142 | mprintfcxx . . $ mprintf.(0, "ST: Dying\n"); |
| 2143 | SetModecxx . . $ SuperThief#SetMode(5016a63d0a5aceb0).(me, SUPERTHIEF_DEATHcxx . . $ `scripts/AIGame.cpp:412:9`!); |
| 2144 | } |
| 2145 | |
| 2146 | if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_DEATHcxx . . $ `scripts/AIGame.cpp:412:9`!) { |
| 2147 | // Do dynamic death |
| 2148 | if ((memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. < 4.0f && memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 4.0f) || |
| 2149 | (memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. < 6.0f && memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 6.0f)) { |
| 2150 | int weapon_id; |
| 2151 | |
| 2152 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 2153 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 2154 | } |
| 2155 | |
| 2156 | if (memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. < 3.0f && memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 3.0f) { |
| 2157 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 2158 | } |
| 2159 | |
| 2160 | if (memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. > 6.2f) { |
| 2161 | mprintfcxx . . $ mprintf.(0, "ST: Died\n"); |
| 2162 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 2163 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 2164 | 0.0f, 0.0f); |
| 2165 | } |
| 2166 | } else if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_INTROcxx . . $ `scripts/AIGame.cpp:414:9`!) { |
| 2167 | if (memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. < 6.0f && memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 6.0f) { |
| 2168 | int flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 2169 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 2170 | |
| 2171 | float awareness = AWARE_FULLYcxx . . $ `Descent3/aistruct_external.h:323:9`!; |
| 2172 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 2173 | } |
| 2174 | |
| 2175 | if (memorycxx . . $ SuperThief#memory.->last_framecxx . . $ superthief_data#last_frame. < 234.0f && anim_frame >= 234.0f) { |
| 2176 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2177 | int type; |
| 2178 | |
| 2179 | memorycxx . . $ SuperThief#memory.->laser_oncxx . . $ superthief_data#laser_on. = true; |
| 2180 | memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj. = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("Invisiblepowerup"), room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 2181 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj.; |
| 2182 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!, &mstruct); |
| 2183 | |
| 2184 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &mstruct.roomnumcxx . . $ msafe_struct#roomnum.); |
| 2185 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.poscxx . . $ msafe_struct#pos.); |
| 2186 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.pos2cxx . . $ msafe_struct#pos2.); |
| 2187 | |
| 2188 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ SuperThief#memory.->laser_objcxx . . $ superthief_data#laser_obj.; |
| 2189 | mstruct.ithandlecxx . . $ msafe_struct#ithandle. = memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj.; |
| 2190 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 10000000.0f; |
| 2191 | mstruct.sizecxx . . $ msafe_struct#size. = 1.0f; |
| 2192 | |
| 2193 | mstruct.intervalcxx . . $ msafe_struct#interval. = 1.0f; |
| 2194 | mstruct.countcxx . . $ msafe_struct#count. = 2; |
| 2195 | mstruct.indexcxx . . $ msafe_struct#index. = 1; |
| 2196 | mstruct.texnumcxx . . $ msafe_struct#texnum. = Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("Stlaser"); |
| 2197 | mstruct.colorcxx . . $ msafe_struct#color. = ((128 >> 3) << 10) | ((128 >> 3) << 5) | (128 >> 3); |
| 2198 | |
| 2199 | mstruct.statecxx . . $ msafe_struct#state. = 0; |
| 2200 | mstruct.flagscxx . . $ msafe_struct#flags. = 0; |
| 2201 | |
| 2202 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_WEATHER_LIGHTNING_BOLTcxx . . $ `scripts/osiris_common.h:863:9`!, &mstruct); |
| 2203 | } |
| 2204 | } else if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_WAITcxx . . $ `scripts/AIGame.cpp:413:9`!) { |
| 2205 | } else { |
| 2206 | // Put the mod stuff here! |
| 2207 | |
| 2208 | if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!) { |
| 2209 | memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 2210 | float last_see_time; |
| 2211 | float last_hear_time; |
| 2212 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_time); |
| 2213 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_time); |
| 2214 | |
| 2215 | if (memorycxx . . $ SuperThief#memory.->next_fire_flare_timecxx . . $ superthief_data#next_fire_flare_time. < Game_GetTimecxx . . $ Game_GetTime.() && last_see_time + 7.0f >= Game_GetTimecxx . . $ Game_GetTime.() && |
| 2216 | last_hear_time + 7.0f >= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 2217 | FireFlarecxx . . $ SuperThief#FireFlare(d4f767463ce0a6b3).(me); |
| 2218 | memorycxx . . $ SuperThief#memory.->flare_fire_indexcxx . . $ superthief_data#flare_fire_index.++; |
| 2219 | |
| 2220 | if (memorycxx . . $ SuperThief#memory.->flare_fire_indexcxx . . $ superthief_data#flare_fire_index. >= 3) { |
| 2221 | memorycxx . . $ SuperThief#memory.->flare_fire_indexcxx . . $ superthief_data#flare_fire_index. = 0; |
| 2222 | memorycxx . . $ SuperThief#memory.->next_fire_flare_timecxx . . $ superthief_data#next_fire_flare_time. = Game_GetTimecxx . . $ Game_GetTime.() + (randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f + 5.0f; |
| 2223 | } else { |
| 2224 | memorycxx . . $ SuperThief#memory.->next_fire_flare_timecxx . . $ superthief_data#next_fire_flare_time. = Game_GetTimecxx . . $ Game_GetTime.() + .75f; |
| 2225 | } |
| 2226 | } |
| 2227 | |
| 2228 | if (memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. < 0.0f) { |
| 2229 | memorycxx . . $ SuperThief#memory.->time_till_fire_secondarycxx . . $ superthief_data#time_till_fire_secondary. = 1.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 2230 | CheckAndFireSecondarycxx . . $ SuperThief#CheckAndFireSecondary(d4f767463ce0a6b3).(me); |
| 2231 | } |
| 2232 | } |
| 2233 | |
| 2234 | if ((!f_force_ranged) && (memorycxx . . $ SuperThief#memory.->next_mode_timecxx . . $ superthief_data#next_mode_time. < Game_GetTimecxx . . $ Game_GetTime.())) { |
| 2235 | if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_MELEEcxx . . $ `scripts/AIGame.cpp:411:9`!) { |
| 2236 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 2237 | memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. = SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!; |
| 2238 | } else if ((randcxx . . $ rand(9efc7249d839d30e).() % 150) > 20) { |
| 2239 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 2240 | memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. = SUPERTHIEF_MELEEcxx . . $ `scripts/AIGame.cpp:411:9`!; |
| 2241 | } |
| 2242 | |
| 2243 | if (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. == SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!) |
| 2244 | memorycxx . . $ SuperThief#memory.->next_mode_timecxx . . $ superthief_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f; |
| 2245 | else |
| 2246 | memorycxx . . $ SuperThief#memory.->next_mode_timecxx . . $ superthief_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + 3.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f; |
| 2247 | } else if ((f_force_ranged) && (memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. != SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!)) { |
| 2248 | // PlaySoundObj3d("RbtStingeattack1", me) |
| 2249 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 2250 | memorycxx . . $ SuperThief#memory.->modecxx . . $ superthief_data#mode. = SUPERTHIEF_RANGEDcxx . . $ `scripts/AIGame.cpp:410:9`!; |
| 2251 | } |
| 2252 | } |
| 2253 | |
| 2254 | memorycxx . . $ SuperThief#memory.->last_framecxx . . $ superthief_data#last_frame. = anim_frame; |
| 2255 | memorycxx . . $ SuperThief#memory.->mode_timecxx . . $ superthief_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 2256 | } |
| 2257 | |
| 2258 | int16_t SuperThiefcxx . . $ SuperThief#::CallEventcxx . . $ SuperThief#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2259 | switch (event) { |
| 2260 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 2261 | DoInitcxx . . $ SuperThief#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2262 | break; |
| 2263 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 2264 | DoIntervalcxx . . $ SuperThief#DoInterval(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2265 | break; |
| 2266 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 2267 | return (DoNotifycxx . . $ SuperThief#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 2268 | break; |
| 2269 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 2270 | SpewEverythingcxx . . $ SuperThief#SpewEverything(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2271 | msafe_structcxx . . $ msafe_struct# mo; |
| 2272 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ SuperThief#memory.->laser_objcxx . . $ superthief_data#laser_obj.; |
| 2273 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 2274 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ SuperThief#memory.->camera_objcxx . . $ superthief_data#camera_obj.; |
| 2275 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 2276 | } break; |
| 2277 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 2278 | memorycxx . . $ SuperThief#memory. = (superthief_datacxx . . $ superthief_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 2279 | |
| 2280 | uint16_tcxx . . $ uint16_t# wpn = Wpn_FindIDcxx . . $ Wpn_FindID.(memorycxx . . $ SuperThief#memory.->weaponcxx . . $ superthief_data#weapon.); |
| 2281 | int snd = Sound_FindIdcxx . . $ Sound_FindId.(memorycxx . . $ SuperThief#memory.->soundcxx . . $ superthief_data#sound.); |
| 2282 | |
| 2283 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_I_FIRE_SOUNDcxx . . $ `scripts/osiris_common.h:671:9`!, &snd, 0); |
| 2284 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!, &memorycxx . . $ SuperThief#memory.->latencycxx . . $ superthief_data#latency., 0); |
| 2285 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_US_GUNPT_WEAPON_IDcxx . . $ `scripts/osiris_common.h:665:9`!, &wpn, 0); |
| 2286 | } break; |
| 2287 | } |
| 2288 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 2289 | } |
| 2290 | |
| 2291 | //----------------- |
| 2292 | // FireAtDist |
| 2293 | //----------------- |
| 2294 | |
| 2295 | struct fireatdist_datacxx . . $ fireatdist_data# { |
| 2296 | int mecxx . . $ fireatdist_data#me.; |
| 2297 | float fire_distcxx . . $ fireatdist_data#fire_dist.; |
| 2298 | float last_test_timecxx . . $ fireatdist_data#last_test_time.; |
| 2299 | bool last_f_firecxx . . $ fireatdist_data#last_f_fire.; |
| 2300 | }; |
| 2301 | |
| 2302 | class FireAtDistcxx . . $ FireAtDist# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 2303 | private: |
| 2304 | fireatdist_datacxx . . $ fireatdist_data# *memorycxx . . $ FireAtDist#memory.; |
| 2305 | void DoInitcxx . . $ FireAtDist#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 2306 | void DoFramecxx . . $ FireAtDist#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 2307 | |
| 2308 | public: |
| 2309 | FireAtDistcxx . . $ FireAtDist#FireAtDist(49f6e7a06ebc5aa8).() {} |
| 2310 | int16_t CallEventcxx . . $ FireAtDist#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2311 | }; |
| 2312 | |
| 2313 | //----------------- |
| 2314 | // HatePTMC |
| 2315 | //----------------- |
| 2316 | |
| 2317 | struct hateptmc_datacxx . . $ hateptmc_data# { |
| 2318 | int mecxx . . $ hateptmc_data#me.; |
| 2319 | float time_till_pulsecxx . . $ hateptmc_data#time_till_pulse.; |
| 2320 | }; |
| 2321 | |
| 2322 | class HatePTMCcxx . . $ HatePTMC# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 2323 | private: |
| 2324 | hateptmc_datacxx . . $ hateptmc_data# *memorycxx . . $ HatePTMC#memory.; |
| 2325 | void DoInitcxx . . $ HatePTMC#DoInit(d4f767463ce0a6b3).(int me_handle); |
| 2326 | void DoFramecxx . . $ HatePTMC#DoFrame(d4f767463ce0a6b3).(int me_handle); |
| 2327 | |
| 2328 | public: |
| 2329 | HatePTMCcxx . . $ HatePTMC#HatePTMC(49f6e7a06ebc5aa8).() {} |
| 2330 | int16_t CallEventcxx . . $ HatePTMC#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2331 | }; |
| 2332 | |
| 2333 | //----------------- |
| 2334 | // Tubbs |
| 2335 | //----------------- |
| 2336 | |
| 2337 | struct tubbs_datacxx . . $ tubbs_data# { |
| 2338 | float base_speedcxx . . $ tubbs_data#base_speed.; |
| 2339 | float base_acccxx . . $ tubbs_data#base_acc.; |
| 2340 | float max_speedcxx . . $ tubbs_data#max_speed.; |
| 2341 | float max_acccxx . . $ tubbs_data#max_acc.; |
| 2342 | float full_anger_timecxx . . $ tubbs_data#full_anger_time.; |
| 2343 | }; |
| 2344 | |
| 2345 | class Tubbscxx . . $ Tubbs# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 2346 | private: |
| 2347 | tubbs_datacxx . . $ tubbs_data# *memorycxx . . $ Tubbs#memory.; |
| 2348 | void DoInitcxx . . $ Tubbs#DoInit(d4f767463ce0a6b3).(int me); |
| 2349 | void DoFramecxx . . $ Tubbs#DoFrame(d4f767463ce0a6b3).(int me); |
| 2350 | bool DoNotifycxx . . $ Tubbs#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 2351 | |
| 2352 | public: |
| 2353 | Tubbscxx . . $ Tubbs#Tubbs(49f6e7a06ebc5aa8).() {} |
| 2354 | int16_t CallEventcxx . . $ Tubbs#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2355 | }; |
| 2356 | |
| 2357 | //----------------- |
| 2358 | // Old Scratch |
| 2359 | //----------------- |
| 2360 | |
| 2361 | struct oldscratch_datacxx . . $ oldscratch_data# { |
| 2362 | float base_speedcxx . . $ oldscratch_data#base_speed.; |
| 2363 | float base_acccxx . . $ oldscratch_data#base_acc.; |
| 2364 | float max_speedcxx . . $ oldscratch_data#max_speed.; |
| 2365 | float max_acccxx . . $ oldscratch_data#max_acc.; |
| 2366 | float full_anger_timecxx . . $ oldscratch_data#full_anger_time.; |
| 2367 | }; |
| 2368 | |
| 2369 | class OldScratchcxx . . $ OldScratch# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 2370 | private: |
| 2371 | oldscratch_datacxx . . $ oldscratch_data# *memorycxx . . $ OldScratch#memory.; |
| 2372 | bool DoStealcxx . . $ OldScratch#DoSteal(cf9ef193275fa6d8).(int me, int it); |
| 2373 | void DoInitcxx . . $ OldScratch#DoInit(d4f767463ce0a6b3).(int me); |
| 2374 | void DoFramecxx . . $ OldScratch#DoFrame(d4f767463ce0a6b3).(int me); |
| 2375 | bool DoNotifycxx . . $ OldScratch#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify); |
| 2376 | |
| 2377 | public: |
| 2378 | OldScratchcxx . . $ OldScratch#OldScratch(49f6e7a06ebc5aa8).() {} |
| 2379 | int16_t CallEventcxx . . $ OldScratch#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2380 | }; |
| 2381 | |
| 2382 | //----------------- |
| 2383 | // BarnSwallow |
| 2384 | //----------------- |
| 2385 | |
| 2386 | #define BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`! 0 |
| 2387 | #define BSM_FOLLOWcxx . . $ `scripts/AIGame.cpp:2387:9`! 1 |
| 2388 | #define BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`! 2 |
| 2389 | #define BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`! 3 |
| 2390 | #define BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`! 4 |
| 2391 | #define BSM_FLEEcxx . . $ `scripts/AIGame.cpp:2391:9`! 5 |
| 2392 | #define BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`! 6 |
| 2393 | |
| 2394 | #define BSCOMM_FOLLOW_MEcxx . . $ `scripts/AIGame.cpp:2394:9`! 0 // send a percent chance so we can have a line sometimes |
| 2395 | #define BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWERcxx . . $ `scripts/AIGame.cpp:2395:9`! 1 |
| 2396 | #define BSCOMM_FOLLOW_CANCEL_FROM_LEADERcxx . . $ `scripts/AIGame.cpp:2396:9`! 2 |
| 2397 | #define BSCOMM_ATTACK_MY_TARGETcxx . . $ `scripts/AIGame.cpp:2397:9`! 3 |
| 2398 | #define BSCOMM_ARE_YOU_IN_MODEcxx . . $ `scripts/AIGame.cpp:2398:9`! 4 |
| 2399 | #define BSCOMM_ARE_YOU_AFTER_POWERUPcxx . . $ `scripts/AIGame.cpp:2399:9`! 5 |
| 2400 | |
| 2401 | #define BSF_HAVE_POWERUPcxx . . $ `scripts/AIGame.cpp:2401:9`! 1 |
| 2402 | #define BSF_ACCEPT_ORDERcxx . . $ `scripts/AIGame.cpp:2402:9`! 2 // clear it before the call... |
| 2403 | |
| 2404 | #define BS_MAX_FRIENDScxx . . $ `scripts/AIGame.cpp:2404:9`! 20 |
| 2405 | |
| 2406 | struct barnswallow_datacxx . . $ barnswallow_data# { |
| 2407 | int home_roomcxx . . $ barnswallow_data#home_room.; |
| 2408 | vectorcxx . . $ vector# nest_centercxx . . $ barnswallow_data#nest_center.; |
| 2409 | float nest_radcxx . . $ barnswallow_data#nest_rad.; |
| 2410 | |
| 2411 | int followercxx . . $ barnswallow_data#follower.; |
| 2412 | |
| 2413 | char num_friendscxx . . $ barnswallow_data#num_friends.; |
| 2414 | int friendscxx . . $ barnswallow_data#friends.[BS_MAX_FRIENDScxx . . $ `scripts/AIGame.cpp:2404:9`!]; |
| 2415 | float next_friend_update_timecxx . . $ barnswallow_data#next_friend_update_time.; |
| 2416 | |
| 2417 | char modecxx . . $ barnswallow_data#mode.; |
| 2418 | char last_non_attack_modecxx . . $ barnswallow_data#last_non_attack_mode.; |
| 2419 | |
| 2420 | float mode_timecxx . . $ barnswallow_data#mode_time.; |
| 2421 | float next_mode_timecxx . . $ barnswallow_data#next_mode_time.; |
| 2422 | float next_attack_timecxx . . $ barnswallow_data#next_attack_time.; |
| 2423 | float next_powerup_timecxx . . $ barnswallow_data#next_powerup_time.; |
| 2424 | float max_time_on_roadcxx . . $ barnswallow_data#max_time_on_road.; |
| 2425 | int powerup_idcxx . . $ barnswallow_data#powerup_id.; |
| 2426 | |
| 2427 | int flagscxx . . $ barnswallow_data#flags.; |
| 2428 | }; |
| 2429 | |
| 2430 | class BarnSwallowcxx . . $ BarnSwallow# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 2431 | private: |
| 2432 | barnswallow_datacxx . . $ barnswallow_data# *memorycxx . . $ BarnSwallow#memory.; |
| 2433 | void DoInitcxx . . $ BarnSwallow#DoInit(d4f767463ce0a6b3).(int me); |
| 2434 | bool SendCommandcxx . . $ BarnSwallow#SendCommand(4d3b4c86c9f4d858).(int me, int it, char command, int value = 0); |
| 2435 | bool ReceiveCommandcxx . . $ BarnSwallow#ReceiveCommand(1f243537e7a7078b).(int me, int it, gb_comcxx . . $ gb_com# *command); |
| 2436 | void ComputeNextNestPntcxx . . $ BarnSwallow#ComputeNextNestPnt(6819790def3fd1d2).(int me, vectorcxx . . $ vector# *pos); |
| 2437 | bool DoNotifycxx . . $ BarnSwallow#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2438 | void ComputeNestcxx . . $ BarnSwallow#ComputeNest(d4f767463ce0a6b3).(int me); |
| 2439 | void UpdateFriendListcxx . . $ BarnSwallow#UpdateFriendList(d4f767463ce0a6b3).(int me); |
| 2440 | void DoFramecxx . . $ BarnSwallow#DoFrame(d4f767463ce0a6b3).(int me); |
| 2441 | bool SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(int me, char mode, int it = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 2442 | |
| 2443 | public: |
| 2444 | BarnSwallowcxx . . $ BarnSwallow#BarnSwallow(49f6e7a06ebc5aa8).() {} |
| 2445 | int16_t CallEventcxx . . $ BarnSwallow#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 2446 | }; |
| 2447 | |
| 2448 | //---------------- |
| 2449 | // Standard stuff |
| 2450 | //---------------- |
| 2451 | |
| 2452 | // SaveRestoreState |
| 2453 | // Purpose: |
| 2454 | // This function is called when Descent 3 is saving or restoring the game state. In this function |
| 2455 | // you should save/restore any global data that you want preserved through load/save (which includes |
| 2456 | // demos). You must be very careful with this function, corrupting the file (reading or writing too |
| 2457 | // much or too little) may be hazardous to the game (possibly making it impossible to restore the |
| 2458 | // state). It would be best to use version information to keep older versions of saved states still |
| 2459 | // able to be used. IT IS VERY IMPORTANT WHEN SAVING THE STATE TO RETURN THE NUMBER OF _BYTES_ WROTE |
| 2460 | // TO THE FILE. When restoring the data, the return value is ignored. saving_state is 1 when you should |
| 2461 | // write data to the file_ptr, 0 when you should read in the data. |
| 2462 | int STDCALLcxx . . $ `lib/module.h:88:11`! SaveRestoreStatecxx . . $ SaveRestoreState(5276b51c10b71c09).(void *file_ptr, uint8_tcxx . . $ uint8_t# saving_state) { return 0; } |
| 2463 | |
| 2464 | char STDCALLcxx . . $ `lib/module.h:88:11`! InitializeDLLcxx . . $ InitializeDLL(f9aae224659b2173).(tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *func_list) { |
| 2465 | osicommon_Initializecxx . . $ osicommon_Initialize(5a9437a4d944b175).((tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *)func_list); |
| 2466 | if (func_list->game_checksumcxx . . $ tOSIRISModuleInit#game_checksum. != CHECKSUMcxx . . $ `<built-in>:477:9`!) { |
| 2467 | mprintfcxx . . $ mprintf.(0, "Game-Checksum FAIL!!! (%ul!=%ul)\n", func_list->game_checksumcxx . . $ tOSIRISModuleInit#game_checksum., CHECKSUMcxx . . $ `<built-in>:477:9`!); |
| 2468 | mprintfcxx . . $ mprintf.(0, "RECOMPILE YOUR SCRIPTS!!!\n"); |
| 2469 | return 0; |
| 2470 | } |
| 2471 | aigame_mod_idcxx . . $ aigame_mod_id. = func_list->module_identifiercxx . . $ tOSIRISModuleInit#module_identifier.; |
| 2472 | String_table_sizecxx . . $ String_table_size. = func_list->string_countcxx . . $ tOSIRISModuleInit#string_count.; |
| 2473 | String_tablecxx . . $ String_table. = func_list->string_tablecxx . . $ tOSIRISModuleInit#string_table.; |
| 2474 | |
| 2475 | return 1; |
| 2476 | } |
| 2477 | |
| 2478 | void STDCALLcxx . . $ `lib/module.h:88:11`! ShutdownDLLcxx . . $ ShutdownDLL(49f6e7a06ebc5aa8).(void) {} |
| 2479 | |
| 2480 | int STDCALLcxx . . $ `lib/module.h:88:11`! GetGOScriptIDcxx . . $ GetGOScriptID(a2648ab7e2ef960e).(const char *name, uint8_tcxx . . $ uint8_t# isdoor) { |
| 2481 | for (int i = 0; i < NUM_IDScxx . . $ `scripts/AIGame.cpp:239:9`!; i++) { |
| 2482 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(name, ScriptInfo[i].name)) { |
| 2483 | return ScriptInfocxx . . $ ScriptInfo.[i].idcxx . . $ tScriptInfo#id.; |
| 2484 | } |
| 2485 | } |
| 2486 | return -1; |
| 2487 | } |
| 2488 | |
| 2489 | void STDCALLPTRcxx . . $ `lib/module.h:90:10`! CreateInstancecxx . . $ CreateInstance(d1680a912d714170).(int id) { |
| 2490 | switch (id) { |
| 2491 | case ID_PESTcxx . . $ `scripts/AIGame.cpp:241:9`!: |
| 2492 | return new Pestcxx . . $ Pest#; |
| 2493 | break; |
| 2494 | case ID_STINGERcxx . . $ `scripts/AIGame.cpp:242:9`!: |
| 2495 | return new Stingercxx . . $ Stinger#; |
| 2496 | break; |
| 2497 | case ID_DRAGONcxx . . $ `scripts/AIGame.cpp:243:9`!: |
| 2498 | return new Dragoncxx . . $ Dragon#; |
| 2499 | break; |
| 2500 | case ID_TRACKERcxx . . $ `scripts/AIGame.cpp:244:9`!: |
| 2501 | return new Trackercxx . . $ Tracker#; |
| 2502 | break; |
| 2503 | case ID_LANCEcxx . . $ `scripts/AIGame.cpp:245:9`!: |
| 2504 | return new Lancecxx . . $ Lance#; |
| 2505 | break; |
| 2506 | case ID_FLAKcxx . . $ `scripts/AIGame.cpp:246:9`!: |
| 2507 | return new Flakcxx . . $ Flak#; |
| 2508 | break; |
| 2509 | case ID_SUPERTROOPERcxx . . $ `scripts/AIGame.cpp:247:9`!: |
| 2510 | case ID_REDSUPERTROOPERcxx . . $ `scripts/AIGame.cpp:248:9`!: |
| 2511 | return new SuperTroopercxx . . $ SuperTrooper#; |
| 2512 | break; |
| 2513 | case ID_JUGGcxx . . $ `scripts/AIGame.cpp:249:9`!: |
| 2514 | return new Juggcxx . . $ Jugg#; |
| 2515 | break; |
| 2516 | case ID_SIXGUNcxx . . $ `scripts/AIGame.cpp:250:9`!: |
| 2517 | return new SixGuncxx . . $ SixGun#; |
| 2518 | break; |
| 2519 | case ID_SICKLEcxx . . $ `scripts/AIGame.cpp:251:9`!: |
| 2520 | return new Sicklecxx . . $ Sickle#; |
| 2521 | break; |
| 2522 | case ID_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:252:9`!: |
| 2523 | return new GuideBotcxx . . $ GuideBot#; |
| 2524 | break; |
| 2525 | case ID_FIREATDISTcxx . . $ `scripts/AIGame.cpp:253:9`!: |
| 2526 | return new FireAtDistcxx . . $ FireAtDist#; |
| 2527 | break; |
| 2528 | case ID_TUBBScxx . . $ `scripts/AIGame.cpp:254:9`!: |
| 2529 | return new Tubbscxx . . $ Tubbs#; |
| 2530 | break; |
| 2531 | case ID_THIEFcxx . . $ `scripts/AIGame.cpp:255:9`!: |
| 2532 | return new Thiefcxx . . $ Thief#; |
| 2533 | break; |
| 2534 | case ID_GBPOWERUPcxx . . $ `scripts/AIGame.cpp:256:9`!: |
| 2535 | return new GBPowerupcxx . . $ GBPowerup#; |
| 2536 | break; |
| 2537 | case ID_BARNSWALLOWcxx . . $ `scripts/AIGame.cpp:257:9`!: |
| 2538 | return new BarnSwallowcxx . . $ BarnSwallow#; |
| 2539 | break; |
| 2540 | case ID_SPARKYcxx . . $ `scripts/AIGame.cpp:258:9`!: |
| 2541 | return new Sparkycxx . . $ Sparky#; |
| 2542 | break; |
| 2543 | case ID_MANTARAYcxx . . $ `scripts/AIGame.cpp:259:9`!: |
| 2544 | return new MantaRaycxx . . $ MantaRay#; |
| 2545 | break; |
| 2546 | case ID_SPYHUNTERcxx . . $ `scripts/AIGame.cpp:260:9`!: |
| 2547 | return new SpyHuntercxx . . $ SpyHunter#; |
| 2548 | break; |
| 2549 | case ID_SNIPERcxx . . $ `scripts/AIGame.cpp:261:9`!: |
| 2550 | return new Snipercxx . . $ Sniper#; |
| 2551 | break; |
| 2552 | case ID_HUMONCULOUScxx . . $ `scripts/AIGame.cpp:262:9`!: |
| 2553 | return new Humonculouscxx . . $ Humonculous#; |
| 2554 | break; |
| 2555 | case ID_SEEKERcxx . . $ `scripts/AIGame.cpp:263:9`!: |
| 2556 | return new Seekercxx . . $ Seeker#; |
| 2557 | break; |
| 2558 | case ID_BETTYcxx . . $ `scripts/AIGame.cpp:264:9`!: |
| 2559 | return new BettyScriptcxx . . $ BettyScript#; |
| 2560 | break; |
| 2561 | case ID_CHAFFcxx . . $ `scripts/AIGame.cpp:265:9`!: |
| 2562 | return new ChaffScriptcxx . . $ ChaffScript#; |
| 2563 | break; |
| 2564 | case ID_CHAFFCHUNKcxx . . $ `scripts/AIGame.cpp:266:9`!: |
| 2565 | return new ChaffChunkScriptcxx . . $ ChaffChunkScript#; |
| 2566 | break; |
| 2567 | case ID_PROXMINEcxx . . $ `scripts/AIGame.cpp:267:9`!: |
| 2568 | return new ProxMinecxx . . $ ProxMine#; |
| 2569 | break; |
| 2570 | case ID_BETTYBOMBcxx . . $ `scripts/AIGame.cpp:268:9`!: |
| 2571 | return new BettyBombcxx . . $ BettyBomb#; |
| 2572 | break; |
| 2573 | case ID_JOSHBELLcxx . . $ `scripts/AIGame.cpp:269:9`!: |
| 2574 | return new JoshBellcxx . . $ JoshBell#; |
| 2575 | break; |
| 2576 | case ID_SKIFFcxx . . $ `scripts/AIGame.cpp:270:9`!: |
| 2577 | return new Skiffcxx . . $ Skiff#; |
| 2578 | break; |
| 2579 | case ID_EXPLODEONCONTACTcxx . . $ `scripts/AIGame.cpp:271:9`!: |
| 2580 | return new ExplodeOnContactcxx . . $ ExplodeOnContact#; |
| 2581 | break; |
| 2582 | case ID_EXPLODETIMEOUTcxx . . $ `scripts/AIGame.cpp:272:9`!: |
| 2583 | return new ExplodeTimeOutcxx . . $ ExplodeTimeOut#; |
| 2584 | break; |
| 2585 | case ID_GUNBOYcxx . . $ `scripts/AIGame.cpp:273:9`!: |
| 2586 | return new Gunboycxx . . $ Gunboy#; |
| 2587 | break; |
| 2588 | case ID_DEATH_TOWERcxx . . $ `scripts/AIGame.cpp:274:9`!: |
| 2589 | return new DTowercxx . . $ DTower#; |
| 2590 | break; |
| 2591 | case ID_DEATH_COLLECTORcxx . . $ `scripts/AIGame.cpp:275:9`!: |
| 2592 | return new DCollectorcxx . . $ DCollector#; |
| 2593 | break; |
| 2594 | case ID_CHEMICAL_BALLcxx . . $ `scripts/AIGame.cpp:276:9`!: |
| 2595 | return new CBallcxx . . $ CBall#; |
| 2596 | break; |
| 2597 | case ID_HELLIONcxx . . $ `scripts/AIGame.cpp:277:9`!: |
| 2598 | return new Hellioncxx . . $ Hellion#; |
| 2599 | break; |
| 2600 | case ID_SUPERTHIEFcxx . . $ `scripts/AIGame.cpp:278:9`!: |
| 2601 | return new SuperThiefcxx . . $ SuperThief#; |
| 2602 | break; |
| 2603 | case ID_EVADERMODAcxx . . $ `scripts/AIGame.cpp:279:9`!: |
| 2604 | return new EvaderModAcxx . . $ EvaderModA#; |
| 2605 | break; |
| 2606 | case ID_DESTROYONCONTACTcxx . . $ `scripts/AIGame.cpp:280:9`!: |
| 2607 | return new DestroyOnContactcxx . . $ DestroyOnContact#; |
| 2608 | break; |
| 2609 | case ID_HATEPTMCcxx . . $ `scripts/AIGame.cpp:281:9`!: |
| 2610 | return new HatePTMCcxx . . $ HatePTMC#; |
| 2611 | break; |
| 2612 | case ID_SNIPERNORUNcxx . . $ `scripts/AIGame.cpp:282:9`!: |
| 2613 | return new SniperNoRuncxx . . $ SniperNoRun#; |
| 2614 | break; |
| 2615 | case ID_FLAMERAScxx . . $ `scripts/AIGame.cpp:283:9`!: |
| 2616 | return new FlameRAScxx . . $ FlameRAS#; |
| 2617 | break; |
| 2618 | case ID_OLDSCRATCHcxx . . $ `scripts/AIGame.cpp:284:9`!: |
| 2619 | return new OldScratchcxx . . $ OldScratch#; |
| 2620 | break; |
| 2621 | default: |
| 2622 | mprintfcxx . . $ mprintf.(0, "SCRIPT: Illegal ID (%d)\n", id); |
| 2623 | break; |
| 2624 | }; |
| 2625 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2626 | } |
| 2627 | |
| 2628 | void STDCALLcxx . . $ `lib/module.h:88:11`! DestroyInstancecxx . . $ DestroyInstance(6ca3d68f5c5f0975).(int id, void *ptr) { |
| 2629 | switch (id) { |
| 2630 | case ID_PESTcxx . . $ `scripts/AIGame.cpp:241:9`!: |
| 2631 | delete ((Pestcxx . . $ Pest# *)ptr); |
| 2632 | break; |
| 2633 | case ID_STINGERcxx . . $ `scripts/AIGame.cpp:242:9`!: |
| 2634 | delete ((Stingercxx . . $ Stinger# *)ptr); |
| 2635 | break; |
| 2636 | case ID_DRAGONcxx . . $ `scripts/AIGame.cpp:243:9`!: |
| 2637 | delete ((Dragoncxx . . $ Dragon# *)ptr); |
| 2638 | break; |
| 2639 | case ID_TRACKERcxx . . $ `scripts/AIGame.cpp:244:9`!: |
| 2640 | delete ((Trackercxx . . $ Tracker# *)ptr); |
| 2641 | break; |
| 2642 | case ID_LANCEcxx . . $ `scripts/AIGame.cpp:245:9`!: |
| 2643 | delete ((Lancecxx . . $ Lance# *)ptr); |
| 2644 | break; |
| 2645 | case ID_FLAKcxx . . $ `scripts/AIGame.cpp:246:9`!: |
| 2646 | delete ((Flakcxx . . $ Flak# *)ptr); |
| 2647 | break; |
| 2648 | case ID_SUPERTROOPERcxx . . $ `scripts/AIGame.cpp:247:9`!: |
| 2649 | case ID_REDSUPERTROOPERcxx . . $ `scripts/AIGame.cpp:248:9`!: |
| 2650 | delete ((SuperTroopercxx . . $ SuperTrooper# *)ptr); |
| 2651 | break; |
| 2652 | case ID_JUGGcxx . . $ `scripts/AIGame.cpp:249:9`!: |
| 2653 | delete ((Juggcxx . . $ Jugg# *)ptr); |
| 2654 | break; |
| 2655 | case ID_SIXGUNcxx . . $ `scripts/AIGame.cpp:250:9`!: |
| 2656 | delete ((SixGuncxx . . $ SixGun# *)ptr); |
| 2657 | break; |
| 2658 | case ID_SICKLEcxx . . $ `scripts/AIGame.cpp:251:9`!: |
| 2659 | delete ((Sicklecxx . . $ Sickle# *)ptr); |
| 2660 | break; |
| 2661 | case ID_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:252:9`!: |
| 2662 | delete ((GuideBotcxx . . $ GuideBot# *)ptr); |
| 2663 | break; |
| 2664 | case ID_FIREATDISTcxx . . $ `scripts/AIGame.cpp:253:9`!: |
| 2665 | delete ((FireAtDistcxx . . $ FireAtDist# *)ptr); |
| 2666 | break; |
| 2667 | case ID_TUBBScxx . . $ `scripts/AIGame.cpp:254:9`!: |
| 2668 | delete ((Tubbscxx . . $ Tubbs# *)ptr); |
| 2669 | break; |
| 2670 | case ID_THIEFcxx . . $ `scripts/AIGame.cpp:255:9`!: |
| 2671 | delete ((Thiefcxx . . $ Thief# *)ptr); |
| 2672 | break; |
| 2673 | case ID_GBPOWERUPcxx . . $ `scripts/AIGame.cpp:256:9`!: |
| 2674 | delete ((GBPowerupcxx . . $ GBPowerup# *)ptr); |
| 2675 | break; |
| 2676 | case ID_BARNSWALLOWcxx . . $ `scripts/AIGame.cpp:257:9`!: |
| 2677 | delete ((BarnSwallowcxx . . $ BarnSwallow# *)ptr); |
| 2678 | break; |
| 2679 | case ID_SPARKYcxx . . $ `scripts/AIGame.cpp:258:9`!: |
| 2680 | delete ((Sparkycxx . . $ Sparky# *)ptr); |
| 2681 | break; |
| 2682 | case ID_MANTARAYcxx . . $ `scripts/AIGame.cpp:259:9`!: |
| 2683 | delete ((MantaRaycxx . . $ MantaRay# *)ptr); |
| 2684 | break; |
| 2685 | case ID_SPYHUNTERcxx . . $ `scripts/AIGame.cpp:260:9`!: |
| 2686 | delete ((SpyHuntercxx . . $ SpyHunter# *)ptr); |
| 2687 | break; |
| 2688 | case ID_SNIPERcxx . . $ `scripts/AIGame.cpp:261:9`!: |
| 2689 | delete ((Snipercxx . . $ Sniper# *)ptr); |
| 2690 | break; |
| 2691 | case ID_HUMONCULOUScxx . . $ `scripts/AIGame.cpp:262:9`!: |
| 2692 | delete ((Humonculouscxx . . $ Humonculous# *)ptr); |
| 2693 | break; |
| 2694 | case ID_SEEKERcxx . . $ `scripts/AIGame.cpp:263:9`!: |
| 2695 | delete ((Seekercxx . . $ Seeker# *)ptr); |
| 2696 | break; |
| 2697 | case ID_BETTYcxx . . $ `scripts/AIGame.cpp:264:9`!: |
| 2698 | delete ((BettyScriptcxx . . $ BettyScript# *)ptr); |
| 2699 | break; |
| 2700 | case ID_CHAFFcxx . . $ `scripts/AIGame.cpp:265:9`!: |
| 2701 | delete ((ChaffScriptcxx . . $ ChaffScript# *)ptr); |
| 2702 | break; |
| 2703 | case ID_CHAFFCHUNKcxx . . $ `scripts/AIGame.cpp:266:9`!: |
| 2704 | delete ((ChaffChunkScriptcxx . . $ ChaffChunkScript# *)ptr); |
| 2705 | break; |
| 2706 | case ID_PROXMINEcxx . . $ `scripts/AIGame.cpp:267:9`!: |
| 2707 | delete ((ProxMinecxx . . $ ProxMine# *)ptr); |
| 2708 | break; |
| 2709 | case ID_BETTYBOMBcxx . . $ `scripts/AIGame.cpp:268:9`!: |
| 2710 | delete ((BettyBombcxx . . $ BettyBomb# *)ptr); |
| 2711 | break; |
| 2712 | case ID_JOSHBELLcxx . . $ `scripts/AIGame.cpp:269:9`!: |
| 2713 | delete ((JoshBellcxx . . $ JoshBell# *)ptr); |
| 2714 | break; |
| 2715 | case ID_SKIFFcxx . . $ `scripts/AIGame.cpp:270:9`!: |
| 2716 | delete ((Skiffcxx . . $ Skiff# *)ptr); |
| 2717 | break; |
| 2718 | case ID_EXPLODEONCONTACTcxx . . $ `scripts/AIGame.cpp:271:9`!: |
| 2719 | delete ((ExplodeOnContactcxx . . $ ExplodeOnContact# *)ptr); |
| 2720 | break; |
| 2721 | case ID_EXPLODETIMEOUTcxx . . $ `scripts/AIGame.cpp:272:9`!: |
| 2722 | delete ((ExplodeTimeOutcxx . . $ ExplodeTimeOut# *)ptr); |
| 2723 | break; |
| 2724 | case ID_GUNBOYcxx . . $ `scripts/AIGame.cpp:273:9`!: |
| 2725 | delete ((Gunboycxx . . $ Gunboy# *)ptr); |
| 2726 | break; |
| 2727 | case ID_DEATH_TOWERcxx . . $ `scripts/AIGame.cpp:274:9`!: |
| 2728 | delete ((DTowercxx . . $ DTower# *)ptr); |
| 2729 | break; |
| 2730 | case ID_DEATH_COLLECTORcxx . . $ `scripts/AIGame.cpp:275:9`!: |
| 2731 | delete ((DCollectorcxx . . $ DCollector# *)ptr); |
| 2732 | break; |
| 2733 | case ID_CHEMICAL_BALLcxx . . $ `scripts/AIGame.cpp:276:9`!: |
| 2734 | delete ((CBallcxx . . $ CBall# *)ptr); |
| 2735 | break; |
| 2736 | case ID_HELLIONcxx . . $ `scripts/AIGame.cpp:277:9`!: |
| 2737 | delete ((Hellioncxx . . $ Hellion# *)ptr); |
| 2738 | break; |
| 2739 | case ID_SUPERTHIEFcxx . . $ `scripts/AIGame.cpp:278:9`!: |
| 2740 | delete ((SuperThiefcxx . . $ SuperThief# *)ptr); |
| 2741 | break; |
| 2742 | case ID_EVADERMODAcxx . . $ `scripts/AIGame.cpp:279:9`!: |
| 2743 | delete ((EvaderModAcxx . . $ EvaderModA# *)ptr); |
| 2744 | break; |
| 2745 | case ID_DESTROYONCONTACTcxx . . $ `scripts/AIGame.cpp:280:9`!: |
| 2746 | delete ((DestroyOnContactcxx . . $ DestroyOnContact# *)ptr); |
| 2747 | break; |
| 2748 | case ID_HATEPTMCcxx . . $ `scripts/AIGame.cpp:281:9`!: |
| 2749 | delete ((HatePTMCcxx . . $ HatePTMC# *)ptr); |
| 2750 | break; |
| 2751 | case ID_SNIPERNORUNcxx . . $ `scripts/AIGame.cpp:282:9`!: |
| 2752 | delete ((SniperNoRuncxx . . $ SniperNoRun# *)ptr); |
| 2753 | break; |
| 2754 | case ID_FLAMERAScxx . . $ `scripts/AIGame.cpp:283:9`!: |
| 2755 | delete ((FlameRAScxx . . $ FlameRAS# *)ptr); |
| 2756 | break; |
| 2757 | case ID_OLDSCRATCHcxx . . $ `scripts/AIGame.cpp:284:9`!: |
| 2758 | delete ((OldScratchcxx . . $ OldScratch# *)ptr); |
| 2759 | break; |
| 2760 | default: |
| 2761 | mprintfcxx . . $ mprintf.(0, "SCRIPT: Illegal ID (%d)\n", id); |
| 2762 | break; |
| 2763 | } |
| 2764 | } |
| 2765 | |
| 2766 | int16_t STDCALLcxx . . $ `lib/module.h:88:11`! CallInstanceEventcxx . . $ CallInstanceEvent(79be2a5a01598f29).(int id, void *ptr, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2767 | return ((BaseObjScriptcxx . . $ BaseObjScript# *)ptr)->CallEventcxx . . $ BaseObjScript#CallEvent(585a6502c7945bab).(event, data); |
| 2768 | } |
| 2769 | |
| 2770 | //============================================ |
| 2771 | // Functions |
| 2772 | //============================================ |
| 2773 | |
| 2774 | static float Obj_GetObjDistcxx . . $ Obj_GetObjDist(209fdf95ab79e58e).(int me, int it, bool f_sub_rads) { |
| 2775 | vectorcxx . . $ vector# me_pos; |
| 2776 | vectorcxx . . $ vector# it_pos; |
| 2777 | float dist; |
| 2778 | |
| 2779 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &me_pos); |
| 2780 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &it_pos); |
| 2781 | |
| 2782 | dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&me_pos, &it_pos); |
| 2783 | |
| 2784 | if (f_sub_rads) { |
| 2785 | float size; |
| 2786 | |
| 2787 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SIZEcxx . . $ `scripts/osiris_common.h:636:9`!, &size); |
| 2788 | dist -= size; |
| 2789 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SIZEcxx . . $ `scripts/osiris_common.h:636:9`!, &size); |
| 2790 | dist -= size; |
| 2791 | } |
| 2792 | |
| 2793 | return dist; |
| 2794 | } |
| 2795 | |
| 2796 | static inline void AIClearNonHPGoalscxx . . $ AIClearNonHPGoals(d4f767463ce0a6b3).(int handle) { |
| 2797 | int i; |
| 2798 | |
| 2799 | for (i = 0; i < MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`!; i++) { |
| 2800 | if (i != 3) |
| 2801 | AI_ClearGoalcxx . . $ AI_ClearGoal.(handle, i); |
| 2802 | } |
| 2803 | } |
| 2804 | |
| 2805 | static inline bool IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(int index) { |
| 2806 | return (index == AIN_GOAL_COMPLETEcxx . . $ `Descent3/aistruct_external.h:294:9`! || index == AIN_GOAL_INVALIDcxx . . $ `Descent3/aistruct_external.h:303:9`! || index == AIN_GOAL_FAILcxx . . $ `Descent3/aistruct_external.h:295:9`! || index == AIN_GOAL_ERRORcxx . . $ `Descent3/aistruct_external.h:296:9`!); |
| 2807 | } |
| 2808 | |
| 2809 | //============================================ |
| 2810 | // Script Implementation |
| 2811 | //============================================ |
| 2812 | BaseObjScriptcxx . . $ BaseObjScript#::BaseObjScriptcxx . . $ BaseObjScript#BaseObjScript(49f6e7a06ebc5aa8).() {} |
| 2813 | |
| 2814 | BaseObjScriptcxx . . $ BaseObjScript#::~cxx . . $ BaseObjScript#`~BaseObjScript`(ced63f7c635d850d).BaseObjScriptcxx . . $ BaseObjScript#() {} |
| 2815 | |
| 2816 | int16_t BaseObjScriptcxx . . $ BaseObjScript#::CallEventcxx . . $ BaseObjScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; } |
| 2817 | |
| 2818 | //----------------- |
| 2819 | // Josh Bell |
| 2820 | //----------------- |
| 2821 | |
| 2822 | void JoshBellcxx . . $ JoshBell#::DoInitcxx . . $ JoshBell#DoInit(d4f767463ce0a6b3).(int me) { |
| 2823 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 2824 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 2825 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(joshbell_datacxx . . $ joshbell_data#); |
| 2826 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 2827 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 2828 | |
| 2829 | memorycxx . . $ JoshBell#memory. = (joshbell_datacxx . . $ joshbell_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 2830 | |
| 2831 | memorycxx . . $ JoshBell#memory.->attach_cagecxx . . $ joshbell_data#attach_cage. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Bellbars", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 0, 0); |
| 2832 | memorycxx . . $ JoshBell#memory.->bell_soundcxx . . $ joshbell_data#bell_sound. = Sound_FindIdcxx . . $ Sound_FindId.("Bell"); |
| 2833 | memorycxx . . $ JoshBell#memory.->last_play_timecxx . . $ joshbell_data#last_play_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 2834 | } |
| 2835 | |
| 2836 | void JoshBellcxx . . $ JoshBell#::DoCollidecxx . . $ JoshBell#DoCollide(d4f767463ce0a6b3).(int me) { |
| 2837 | int child_handle = Obj_GetAttachChildHandlecxx . . $ Obj_GetAttachChildHandle.(me, 0); |
| 2838 | |
| 2839 | if (child_handle == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`! /* && memory->last_play_time + 2.0f < Game_GetTime()*/) { |
| 2840 | memorycxx . . $ JoshBell#memory.->last_play_timecxx . . $ joshbell_data#last_play_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 2841 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ JoshBell#memory.->bell_soundcxx . . $ joshbell_data#bell_sound.); |
| 2842 | } |
| 2843 | } |
| 2844 | |
| 2845 | int16_t JoshBellcxx . . $ JoshBell#::CallEventcxx . . $ JoshBell#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2846 | switch (event) { |
| 2847 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: |
| 2848 | DoInitcxx . . $ JoshBell#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2849 | break; |
| 2850 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 2851 | DoCollidecxx . . $ JoshBell#DoCollide(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2852 | break; |
| 2853 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 2854 | memorycxx . . $ JoshBell#memory. = (joshbell_datacxx . . $ joshbell_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 2855 | } break; |
| 2856 | } |
| 2857 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 2858 | } |
| 2859 | |
| 2860 | //----------------- |
| 2861 | // Explode On Contact |
| 2862 | //----------------- |
| 2863 | |
| 2864 | void ExplodeOnContactcxx . . $ ExplodeOnContact#::DoCollidecxx . . $ ExplodeOnContact#DoCollide(3e454b8ccf442868).(int me, int it) { |
| 2865 | int type; |
| 2866 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 2867 | |
| 2868 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 2869 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2870 | |
| 2871 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 2872 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2873 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 2874 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 2875 | |
| 2876 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 2877 | } |
| 2878 | } |
| 2879 | |
| 2880 | int16_t ExplodeOnContactcxx . . $ ExplodeOnContact#::CallEventcxx . . $ ExplodeOnContact#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2881 | switch (event) { |
| 2882 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 2883 | DoCollidecxx . . $ ExplodeOnContact#DoCollide(3e454b8ccf442868).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle.); |
| 2884 | break; |
| 2885 | } |
| 2886 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 2887 | } |
| 2888 | |
| 2889 | //----------------- |
| 2890 | // Destroy On Contact |
| 2891 | //----------------- |
| 2892 | |
| 2893 | void DestroyOnContactcxx . . $ DestroyOnContact#::DoCollidecxx . . $ DestroyOnContact#DoCollide(3e454b8ccf442868).(int me, int it) { |
| 2894 | int type; |
| 2895 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 2896 | |
| 2897 | if (type == OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`! || type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! || type == OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`! || type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 2898 | Obj_Killcxx . . $ Obj_Kill.(it, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 2899 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 2900 | 0.0f, 0.0f); |
| 2901 | } |
| 2902 | } |
| 2903 | |
| 2904 | int16_t DestroyOnContactcxx . . $ DestroyOnContact#::CallEventcxx . . $ DestroyOnContact#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2905 | switch (event) { |
| 2906 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 2907 | DoCollidecxx . . $ DestroyOnContact#DoCollide(3e454b8ccf442868).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle.); |
| 2908 | break; |
| 2909 | } |
| 2910 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 2911 | } |
| 2912 | |
| 2913 | // -------------- |
| 2914 | // Pest |
| 2915 | // -------------- |
| 2916 | |
| 2917 | void Pestcxx . . $ Pest#::DoInitcxx . . $ Pest#DoInit(d4f767463ce0a6b3).(int me) { |
| 2918 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 2919 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 2920 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(pest_datacxx . . $ pest_data#); |
| 2921 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 2922 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 2923 | |
| 2924 | memorycxx . . $ Pest#memory. = (pest_datacxx . . $ pest_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 2925 | |
| 2926 | memorycxx . . $ Pest#memory.->tail_handlecxx . . $ pest_data#tail_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Pesttail", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 2927 | memorycxx . . $ Pest#memory.->last_anim_framecxx . . $ pest_data#last_anim_frame. = 0; |
| 2928 | |
| 2929 | memorycxx . . $ Pest#memory.->foot_soundscxx . . $ pest_data#foot_sounds.[0] = Sound_FindIdcxx . . $ Sound_FindId.("RbtPestFoot1"); |
| 2930 | memorycxx . . $ Pest#memory.->foot_soundscxx . . $ pest_data#foot_sounds.[1] = Sound_FindIdcxx . . $ Sound_FindId.("RbtPestFoot2"); |
| 2931 | memorycxx . . $ Pest#memory.->foot_soundscxx . . $ pest_data#foot_sounds.[2] = Sound_FindIdcxx . . $ Sound_FindId.("RbtPestFoot3"); |
| 2932 | |
| 2933 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 2934 | } |
| 2935 | |
| 2936 | int16_t Pestcxx . . $ Pest#::CallEventcxx . . $ Pest#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 2937 | switch (event) { |
| 2938 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 2939 | DoInitcxx . . $ Pest#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 2940 | break; |
| 2941 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: { |
| 2942 | float frame; |
| 2943 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &frame); |
| 2944 | if ((frame > 9 && memorycxx . . $ Pest#memory.->last_anim_framecxx . . $ pest_data#last_anim_frame. <= 9) || (frame > 10 && memorycxx . . $ Pest#memory.->last_anim_framecxx . . $ pest_data#last_anim_frame. <= 10) || |
| 2945 | (frame > 13 && memorycxx . . $ Pest#memory.->last_anim_framecxx . . $ pest_data#last_anim_frame. <= 13)) { |
| 2946 | int index = randcxx . . $ rand(9efc7249d839d30e).() % 3; |
| 2947 | |
| 2948 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., memorycxx . . $ Pest#memory.->foot_soundscxx . . $ pest_data#foot_sounds.[index]); |
| 2949 | } |
| 2950 | |
| 2951 | memorycxx . . $ Pest#memory.->last_anim_framecxx . . $ pest_data#last_anim_frame. = frame; |
| 2952 | } break; |
| 2953 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 2954 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 2955 | |
| 2956 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Pest#memory.->tail_handlecxx . . $ pest_data#tail_handle.; |
| 2957 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 2958 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 2959 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 2960 | |
| 2961 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 2962 | } break; |
| 2963 | break; |
| 2964 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 2965 | memorycxx . . $ Pest#memory. = (pest_datacxx . . $ pest_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 2966 | } break; |
| 2967 | } |
| 2968 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 2969 | } |
| 2970 | |
| 2971 | // -------------- |
| 2972 | // Stinger |
| 2973 | // -------------- |
| 2974 | |
| 2975 | #define STINGER_MELEE_DISTcxx . . $ `scripts/AIGame.cpp:2975:9`! 50.0f |
| 2976 | |
| 2977 | void Stingercxx . . $ Stinger#::DoInitcxx . . $ Stinger#DoInit(d4f767463ce0a6b3).(int me) { |
| 2978 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 2979 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 2980 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(stinger_datacxx . . $ stinger_data#); |
| 2981 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 2982 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 2983 | |
| 2984 | memorycxx . . $ Stinger#memory. = (stinger_datacxx . . $ stinger_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 2985 | |
| 2986 | msafe_structcxx . . $ msafe_struct# m; |
| 2987 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 2988 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 2989 | |
| 2990 | memorycxx . . $ Stinger#memory.->next_mode_timecxx . . $ stinger_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f + 3.0f; |
| 2991 | memorycxx . . $ Stinger#memory.->force_melee_shieldscxx . . $ stinger_data#force_melee_shields. = m.shieldscxx . . $ msafe_struct#shields. / 3.0f + ((((float)randcxx . . $ rand(9efc7249d839d30e).()) / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * m.shieldscxx . . $ msafe_struct#shields.) / 10.0f; |
| 2992 | memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. = STINGER_RANGEDcxx . . $ `scripts/AIGame.cpp:376:9`!; |
| 2993 | memorycxx . . $ Stinger#memory.->f_very_hurtcxx . . $ stinger_data#f_very_hurt. = 0; |
| 2994 | |
| 2995 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 2996 | } |
| 2997 | |
| 2998 | void Stingercxx . . $ Stinger#::DoIntervalcxx . . $ Stinger#DoInterval(d4f767463ce0a6b3).(int me) { |
| 2999 | bool f_force_melee = false; |
| 3000 | int target_handle; |
| 3001 | |
| 3002 | msafe_structcxx . . $ msafe_struct# m; |
| 3003 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 3004 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 3005 | |
| 3006 | memorycxx . . $ Stinger#memory.->f_very_hurtcxx . . $ stinger_data#f_very_hurt. = f_force_melee = (m.shieldscxx . . $ msafe_struct#shields. < memorycxx . . $ Stinger#memory.->force_melee_shieldscxx . . $ stinger_data#force_melee_shields.) != 0; |
| 3007 | |
| 3008 | if (!f_force_melee) { |
| 3009 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 3010 | |
| 3011 | if (target_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 3012 | float dist; |
| 3013 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_DIST_TO_TARGETcxx . . $ `scripts/osiris_common.h:526:9`!, &dist); |
| 3014 | |
| 3015 | if (dist < STINGER_MELEE_DISTcxx . . $ `scripts/AIGame.cpp:2975:9`!) { |
| 3016 | f_force_melee = true; |
| 3017 | } |
| 3018 | } |
| 3019 | } |
| 3020 | |
| 3021 | if ((!f_force_melee) && (memorycxx . . $ Stinger#memory.->next_mode_timecxx . . $ stinger_data#next_mode_time. < Game_GetTimecxx . . $ Game_GetTime.())) { |
| 3022 | memorycxx . . $ Stinger#memory.->next_mode_timecxx . . $ stinger_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + 7.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f; |
| 3023 | |
| 3024 | if (randcxx . . $ rand(9efc7249d839d30e).() % 150 > 10) { |
| 3025 | if (memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. == STINGER_MELEEcxx . . $ `scripts/AIGame.cpp:377:9`!) { |
| 3026 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 3027 | memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. = STINGER_RANGEDcxx . . $ `scripts/AIGame.cpp:376:9`!; |
| 3028 | } |
| 3029 | } else { |
| 3030 | if (memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. == STINGER_RANGEDcxx . . $ `scripts/AIGame.cpp:376:9`!) { |
| 3031 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 3032 | memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. = STINGER_MELEEcxx . . $ `scripts/AIGame.cpp:377:9`!; |
| 3033 | } |
| 3034 | } |
| 3035 | } else if ((f_force_melee) && (memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. != STINGER_MELEEcxx . . $ `scripts/AIGame.cpp:377:9`!)) { |
| 3036 | // PlaySoundObj3d("RbtStingeattack1", me) |
| 3037 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 3038 | memorycxx . . $ Stinger#memory.->modecxx . . $ stinger_data#mode. = STINGER_MELEEcxx . . $ `scripts/AIGame.cpp:377:9`!; |
| 3039 | } |
| 3040 | } |
| 3041 | |
| 3042 | int16_t Stingercxx . . $ Stinger#::CallEventcxx . . $ Stinger#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3043 | switch (event) { |
| 3044 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3045 | DoInitcxx . . $ Stinger#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3046 | break; |
| 3047 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 3048 | DoIntervalcxx . . $ Stinger#DoInterval(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3049 | break; |
| 3050 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 3051 | memorycxx . . $ Stinger#memory. = (stinger_datacxx . . $ stinger_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 3052 | } break; |
| 3053 | } |
| 3054 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 3055 | } |
| 3056 | |
| 3057 | // -------------- |
| 3058 | // Humonculous |
| 3059 | // -------------- |
| 3060 | |
| 3061 | // Humonculous modes are in prescidence order (lowest to highest) |
| 3062 | #define HM_IDLEcxx . . $ `scripts/AIGame.cpp:3062:9`! 0x0001 |
| 3063 | #define HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`! 0x0002 |
| 3064 | #define HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! 0x0004 |
| 3065 | #define HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! 0x0008 |
| 3066 | #define HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`! 0x0010 |
| 3067 | #define HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`! 0x0020 |
| 3068 | #define HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`! 0x0040 |
| 3069 | #define HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`! 0x0080 |
| 3070 | #define HM_DEATH_CHARGEcxx . . $ `scripts/AIGame.cpp:3070:9`! 0x0100 |
| 3071 | #define HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`! 0x0200 |
| 3072 | #define HM_DEADcxx . . $ `scripts/AIGame.cpp:3072:9`! 0x0400 |
| 3073 | |
| 3074 | #define H_WALL_HIT_INTERVALcxx . . $ `scripts/AIGame.cpp:3074:9`! 15.0f |
| 3075 | |
| 3076 | #define H_DOOR_WAIT_TIMEcxx . . $ `scripts/AIGame.cpp:3076:9`! 8.0f |
| 3077 | |
| 3078 | // Valid next modes from each mode (Humonculous Mode Valid Next) |
| 3079 | const int16_t hm_valid_next_modescxx . . $ hm_valid_next_modes.[11] = { |
| 3080 | (HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`!), |
| 3081 | (HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! | HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! | HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`! | HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`! | HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!), |
| 3082 | (HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! | HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! | HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`! | HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`! | HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!), |
| 3083 | (HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! | HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! | HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`! | HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`! | HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!), |
| 3084 | (HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! | HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! | HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`! | HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!), |
| 3085 | (HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`! | HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`! | HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`! | HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!), |
| 3086 | (HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`!), |
| 3087 | (HM_DEATH_CHARGEcxx . . $ `scripts/AIGame.cpp:3070:9`!), |
| 3088 | (HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`!), |
| 3089 | (HM_DEADcxx . . $ `scripts/AIGame.cpp:3072:9`!), |
| 3090 | (0), |
| 3091 | }; |
| 3092 | |
| 3093 | #define HF_PLAYER_DEADcxx . . $ `scripts/AIGame.cpp:3093:9`! 0x01 |
| 3094 | #define HF_VERY_HURTcxx . . $ `scripts/AIGame.cpp:3094:9`! 0x02 |
| 3095 | #define HF_DID_FINAL_MELEEcxx . . $ `scripts/AIGame.cpp:3095:9`! 0x04 |
| 3096 | #define HF_LANDEDcxx . . $ `scripts/AIGame.cpp:3096:9`! 0x08 |
| 3097 | #define HF_ORIENTEDcxx . . $ `scripts/AIGame.cpp:3097:9`! 0x10 |
| 3098 | #define HF_HIT_WALLcxx . . $ `scripts/AIGame.cpp:3098:9`! 0x20 |
| 3099 | #define HF_DID_MID_DAMAGEcxx . . $ `scripts/AIGame.cpp:3099:9`! 0x40 |
| 3100 | #define HF_HIT_WALL_SHAKEDcxx . . $ `scripts/AIGame.cpp:3100:9`! 0x80 |
| 3101 | #define HF_HIT_WALL_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3101:9`! 0x100 |
| 3102 | #define HF_MID_DAMAGE_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3102:9`! 0x200 |
| 3103 | #define HF_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3103:9`! 0x400 |
| 3104 | #define HF_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3104:9`! 0x800 |
| 3105 | |
| 3106 | #define H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`! 0x1010002B |
| 3107 | #define H_GUID_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3107:9`! 0x101000BE |
| 3108 | #define H_GUID_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3108:9`! 0x10100022 |
| 3109 | |
| 3110 | // chrishack -- NOTE: Give the player an extra powerup if he kills the boss before he can do his |
| 3111 | // final melee attack |
| 3112 | |
| 3113 | #define H_MELEE_DISTcxx . . $ `scripts/AIGame.cpp:3113:9`! 50.0f |
| 3114 | |
| 3115 | void Humonculouscxx . . $ Humonculous#::DetermineDeathPoscxx . . $ Humonculous#DetermineDeathPos(3b84d284e8efb0f0).(int me, vectorcxx . . $ vector# *dpos, int *droom) { |
| 3116 | float best_dist = 100000000.0f; |
| 3117 | int best_dp; |
| 3118 | vectorcxx . . $ vector# dp[6]; |
| 3119 | int dr[6]; |
| 3120 | int i; |
| 3121 | |
| 3122 | vectorcxx . . $ vector# mpos; |
| 3123 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mpos); |
| 3124 | |
| 3125 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath01"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[0]); |
| 3126 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath01"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[0]); |
| 3127 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath02"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[1]); |
| 3128 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath02"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[1]); |
| 3129 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath03"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[2]); |
| 3130 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath03"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[2]); |
| 3131 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath04"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[3]); |
| 3132 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath04"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[3]); |
| 3133 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath05"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[4]); |
| 3134 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath05"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[4]); |
| 3135 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath06"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &dp[5]); |
| 3136 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("SafeDeath06"), VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &dr[5]); |
| 3137 | |
| 3138 | for (i = 0; i < 6; i++) { |
| 3139 | dp[i].ycxx . . $ vector#y. = -440.0f; |
| 3140 | |
| 3141 | float cur_dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&mpos, &dp[i]); |
| 3142 | |
| 3143 | if (cur_dist < best_dist) { |
| 3144 | *dpos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). dp[i]; |
| 3145 | *droom = dr[i]; |
| 3146 | best_dist = cur_dist; |
| 3147 | } |
| 3148 | } |
| 3149 | } |
| 3150 | |
| 3151 | bool Humonculouscxx . . $ Humonculous#::DoNotifycxx . . $ Humonculous#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3152 | switch (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode.) { |
| 3153 | case HM_IDLEcxx . . $ `scripts/AIGame.cpp:3062:9`!: { |
| 3154 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_STARTcxx . . $ `Descent3/aistruct_external.h:312:9`!) { |
| 3155 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`!); |
| 3156 | } |
| 3157 | } break; |
| 3158 | |
| 3159 | case HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`!: { |
| 3160 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!) { |
| 3161 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!); |
| 3162 | } |
| 3163 | } break; |
| 3164 | |
| 3165 | case HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!: { |
| 3166 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_GOAL_COMPLETEcxx . . $ `Descent3/aistruct_external.h:294:9`! && data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_uidcxx . . $ tOSIRISEVTAINOTIFY#goal_uid. == H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`!) { |
| 3167 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 101.0f, 125.0f, 4.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclIWallHit"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 3168 | } |
| 3169 | } break; |
| 3170 | |
| 3171 | case HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!: |
| 3172 | case HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`!: { |
| 3173 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_SCRIPTED_ORIENTcxx . . $ `Descent3/aistruct_external.h:311:9`!) { |
| 3174 | vectorcxx . . $ vector# uvec = Zero_vectorcxx . . $ Zero_vector.; |
| 3175 | uvec.ycxx . . $ vector#y. = 1.0f; |
| 3176 | |
| 3177 | if (AI_TurnTowardsVectorscxx . . $ AI_TurnTowardsVectors.(me, &memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec., &uvec)) |
| 3178 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_ORIENTEDcxx . . $ `scripts/AIGame.cpp:3097:9`!; |
| 3179 | else |
| 3180 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. &= ~HF_ORIENTEDcxx . . $ `scripts/AIGame.cpp:3097:9`!; |
| 3181 | } |
| 3182 | |
| 3183 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_GOAL_COMPLETEcxx . . $ `Descent3/aistruct_external.h:294:9`! && data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_uidcxx . . $ tOSIRISEVTAINOTIFY#goal_uid. == H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`!) { |
| 3184 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_LANDEDcxx . . $ `scripts/AIGame.cpp:3096:9`!; |
| 3185 | } |
| 3186 | |
| 3187 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_GOAL_COMPLETEcxx . . $ `Descent3/aistruct_external.h:294:9`! && data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_uidcxx . . $ tOSIRISEVTAINOTIFY#goal_uid. == H_GUID_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3107:9`!) { |
| 3188 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3103:9`!; |
| 3189 | memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. = 0.0f; |
| 3190 | |
| 3191 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 3192 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 3193 | |
| 3194 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 167.0f, 210.0f, 6.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclFakeDeath"), -1); |
| 3195 | } |
| 3196 | |
| 3197 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_GOAL_COMPLETEcxx . . $ `Descent3/aistruct_external.h:294:9`! && data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_uidcxx . . $ tOSIRISEVTAINOTIFY#goal_uid. == H_GUID_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3108:9`!) { |
| 3198 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3104:9`!; |
| 3199 | memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. = 0.0f; |
| 3200 | |
| 3201 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 3202 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 3203 | |
| 3204 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 242.0f, 350.0f, 15.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclDeath"), -1); |
| 3205 | } |
| 3206 | } break; |
| 3207 | } |
| 3208 | |
| 3209 | return true; |
| 3210 | } |
| 3211 | |
| 3212 | bool Humonculouscxx . . $ Humonculous#::SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(int me, uint16_tcxx . . $ uint16_t# mode) { |
| 3213 | int new_mode_index = -1; |
| 3214 | int old_mode_index = -1; |
| 3215 | |
| 3216 | int temp = mode; |
| 3217 | |
| 3218 | // Determine the index (bit position from 0 to 31) of the mode (they are bit flags) |
| 3219 | do { |
| 3220 | temp >>= 1; |
| 3221 | new_mode_index++; |
| 3222 | } while (temp != 0); |
| 3223 | |
| 3224 | temp = memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode.; |
| 3225 | do { |
| 3226 | temp >>= 1; |
| 3227 | old_mode_index++; |
| 3228 | } while (temp != 0); |
| 3229 | |
| 3230 | // Reactivates firing and melee attacks |
| 3231 | if (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. == HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!) { |
| 3232 | memorycxx . . $ Humonculous#memory.->next_wall_hit_check_timecxx . . $ humonculous_data#next_wall_hit_check_time. = Game_GetTimecxx . . $ Game_GetTime.() + H_WALL_HIT_INTERVALcxx . . $ `scripts/AIGame.cpp:3074:9`!; |
| 3233 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3234 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3235 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3236 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3237 | |
| 3238 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 3239 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3240 | |
| 3241 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. &= ~(HF_HIT_WALL_SHAKEDcxx . . $ `scripts/AIGame.cpp:3100:9`! | HF_HIT_WALLcxx . . $ `scripts/AIGame.cpp:3098:9`!); |
| 3242 | } else if (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. == HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`!) { |
| 3243 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3244 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3245 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3246 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3247 | } |
| 3248 | |
| 3249 | // Determine if we can goto the next mode |
| 3250 | if (!(hm_valid_next_modescxx . . $ hm_valid_next_modes.[old_mode_index] & mode)) |
| 3251 | return false; |
| 3252 | |
| 3253 | // Clear out the robot |
| 3254 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 3255 | |
| 3256 | switch (mode) { |
| 3257 | case HM_IDLEcxx . . $ `scripts/AIGame.cpp:3062:9`!: { |
| 3258 | } break; |
| 3259 | case HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`!: { |
| 3260 | } break; |
| 3261 | case HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!: { |
| 3262 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 3263 | } break; |
| 3264 | case HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!: { |
| 3265 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 3266 | } break; |
| 3267 | case HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!: { |
| 3268 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_HIT_WALL_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3101:9`!; |
| 3269 | |
| 3270 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3271 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3272 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3273 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3274 | |
| 3275 | vectorcxx . . $ vector# start_pos; |
| 3276 | int start_room; |
| 3277 | vectorcxx . . $ vector# end_pos; |
| 3278 | |
| 3279 | ray_infocxx . . $ ray_info# ray; |
| 3280 | |
| 3281 | matrixcxx . . $ matrix# orient; |
| 3282 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 3283 | |
| 3284 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.fveccxx . . $ matrix#fvec.; |
| 3285 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec..ycxx . . $ vector#y. = 0.0f; |
| 3286 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec.); |
| 3287 | orient.fveccxx . . $ matrix#fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec.; |
| 3288 | |
| 3289 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&orient.rveccxx . . $ matrix#rvec.); |
| 3290 | |
| 3291 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &start_pos); |
| 3292 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &start_room); |
| 3293 | |
| 3294 | // Determine real start pos - room |
| 3295 | end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). start_pos; |
| 3296 | end_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). 29.0f; |
| 3297 | end_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 33.215f; |
| 3298 | |
| 3299 | flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 3300 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 3301 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 3302 | |
| 3303 | start_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ray.hit_pointcxx . . $ ray_info#hit_point.; |
| 3304 | start_room = ray.hit_roomcxx . . $ ray_info#hit_room.; |
| 3305 | |
| 3306 | end_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). 5000.0f *cxx . . $ `operator*`(9d6577ff3e9faa29). orient.rveccxx . . $ matrix#rvec.; |
| 3307 | |
| 3308 | flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 3309 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 3310 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 3311 | |
| 3312 | if (ray.hit_wallnormcxx . . $ ray_info#hit_wallnorm. *cxx . . $ `operator*`(4a721543d64e126a). orient.rveccxx . . $ matrix#rvec. > -0.95) { |
| 3313 | memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. = HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!; |
| 3314 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!); |
| 3315 | return false; |
| 3316 | } |
| 3317 | |
| 3318 | memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos. =cxx . . $ vector#`operator=`(c0842353a20857d). ray.hit_pointcxx . . $ ray_info#hit_point. -cxx . . $ operator-(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 33.215f) -cxx . . $ operator-(b77b703cd1e43e33). (orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). 29.0f); |
| 3319 | |
| 3320 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`!, GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, |
| 3321 | &memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos., ray.hit_roomcxx . . $ ray_info#hit_room.); |
| 3322 | |
| 3323 | float dist = 0.0f; |
| 3324 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 3325 | |
| 3326 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 3327 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3328 | } break; |
| 3329 | case HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`!: { |
| 3330 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_MID_DAMAGE_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3102:9`!; |
| 3331 | |
| 3332 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3333 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3334 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3335 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3336 | |
| 3337 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 360.0f, 420.0f, 8.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclMidTaunt"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 3338 | } break; |
| 3339 | case HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!: { |
| 3340 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3341 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3342 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3343 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3344 | |
| 3345 | // Guarentee no wall hits or mid damage stuff after the fake death |
| 3346 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= (HF_HIT_WALL_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3101:9`! | HF_MID_DAMAGE_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3102:9`!); |
| 3347 | |
| 3348 | vectorcxx . . $ vector# dpos; |
| 3349 | int droom; |
| 3350 | DetermineDeathPoscxx . . $ Humonculous#DetermineDeathPos(3b84d284e8efb0f0).(me, &dpos, &droom); |
| 3351 | |
| 3352 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 3, 1.0, H_GUID_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3107:9`!, GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &dpos, droom); |
| 3353 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 3, 0.0f); |
| 3354 | } break; |
| 3355 | case HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`!: { |
| 3356 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 210.0f, 242.0f, 5.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclFakeGetUp"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 3357 | } break; |
| 3358 | case HM_DEATH_CHARGEcxx . . $ `scripts/AIGame.cpp:3070:9`!: { |
| 3359 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. &= ~(HF_LANDEDcxx . . $ `scripts/AIGame.cpp:3096:9`! | HF_ORIENTEDcxx . . $ `scripts/AIGame.cpp:3097:9`!); |
| 3360 | |
| 3361 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Humonculous#memory.->max_speedcxx . . $ humonculous_data#max_speed.); |
| 3362 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Humonculous#memory.->max_delta_speedcxx . . $ humonculous_data#max_delta_speed.); |
| 3363 | |
| 3364 | int flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 3365 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3366 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 3367 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3368 | |
| 3369 | flags = AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3370 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3371 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3372 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3373 | |
| 3374 | flags = OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!; |
| 3375 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 3376 | |
| 3377 | msafe_structcxx . . $ msafe_struct# m; |
| 3378 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 3379 | m.shieldscxx . . $ msafe_struct#shields. = 20.0f; |
| 3380 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 3381 | |
| 3382 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 3383 | } break; |
| 3384 | case HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`!: { |
| 3385 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 3386 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3387 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 3388 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3389 | |
| 3390 | float circle_dist = -1.0f; |
| 3391 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &circle_dist); |
| 3392 | |
| 3393 | vectorcxx . . $ vector# dpos; |
| 3394 | int droom; |
| 3395 | DetermineDeathPoscxx . . $ Humonculous#DetermineDeathPos(3b84d284e8efb0f0).(me, &dpos, &droom); |
| 3396 | |
| 3397 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 3, 1.0, H_GUID_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3108:9`!, GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &dpos, droom); |
| 3398 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 3, 0.0f); |
| 3399 | } break; |
| 3400 | case HM_DEADcxx . . $ `scripts/AIGame.cpp:3072:9`!: { |
| 3401 | } break; |
| 3402 | default: |
| 3403 | mprintfcxx . . $ mprintf.(0, "WHAT ARE YOU DOING!!!!!!!!!!!!!"); |
| 3404 | } |
| 3405 | |
| 3406 | // Reset the important mode variables |
| 3407 | memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. = mode; |
| 3408 | memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. = 0.0f; |
| 3409 | |
| 3410 | return true; |
| 3411 | } |
| 3412 | |
| 3413 | void Humonculouscxx . . $ Humonculous#::DoInitcxx . . $ Humonculous#DoInit(d4f767463ce0a6b3).(int me) { |
| 3414 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 3415 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 3416 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(humonculous_datacxx . . $ humonculous_data#); |
| 3417 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 3418 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 3419 | |
| 3420 | memorycxx . . $ Humonculous#memory. = (humonculous_datacxx . . $ humonculous_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 3421 | |
| 3422 | char diff = Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 3423 | float shields; |
| 3424 | float speed; |
| 3425 | int flags; |
| 3426 | |
| 3427 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 3428 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 3429 | |
| 3430 | if (diff == DIFFICULTY_TRAINEEcxx . . $ `Descent3/difficulty_external.h:25:9`!) { |
| 3431 | shields = shields * 0.7f; |
| 3432 | speed = speed * 0.6f; |
| 3433 | } else if (diff == DIFFICULTY_ROOKIEcxx . . $ `Descent3/difficulty_external.h:26:9`!) { |
| 3434 | shields = shields * 0.85f; |
| 3435 | speed = speed * 0.7f; |
| 3436 | } |
| 3437 | |
| 3438 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 3439 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 3440 | |
| 3441 | memorycxx . . $ Humonculous#memory.->last_shieldscxx . . $ humonculous_data#last_shields. = shields; |
| 3442 | memorycxx . . $ Humonculous#memory.->next_mode_timecxx . . $ humonculous_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f + 3.0f; |
| 3443 | memorycxx . . $ Humonculous#memory.->force_melee_shieldscxx . . $ humonculous_data#force_melee_shields. = shields / 3.0f + ((((float)randcxx . . $ rand(9efc7249d839d30e).()) / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * shields) / 10.0f; |
| 3444 | memorycxx . . $ Humonculous#memory.->force_mid_damage_shieldscxx . . $ humonculous_data#force_mid_damage_shields. = shields * 0.5f; |
| 3445 | memorycxx . . $ Humonculous#memory.->force_wall_hit_shieldscxx . . $ humonculous_data#force_wall_hit_shields. = shields * 0.80f; |
| 3446 | memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. = HM_IDLEcxx . . $ `scripts/AIGame.cpp:3062:9`!; |
| 3447 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. = 0; |
| 3448 | memorycxx . . $ Humonculous#memory.->next_wall_hit_check_timecxx . . $ humonculous_data#next_wall_hit_check_time. = Game_GetTimecxx . . $ Game_GetTime.() + 25.0f; |
| 3449 | |
| 3450 | matrixcxx . . $ matrix# orient; |
| 3451 | vectorcxx . . $ vector# pos; |
| 3452 | vectorcxx . . $ vector# g_pos; |
| 3453 | vectorcxx . . $ vector# g_norm; |
| 3454 | |
| 3455 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 3456 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 3457 | Obj_GetGroundPoscxx . . $ Obj_GetGroundPos(acebd7a68d406969).(me, 0, &g_pos, &g_norm); |
| 3458 | |
| 3459 | vectorcxx . . $ vector# from_ground = pos -cxx . . $ operator-(b77b703cd1e43e33). g_pos; |
| 3460 | memorycxx . . $ Humonculous#memory.->ground_pnt_offsetcxx . . $ humonculous_data#ground_pnt_offset. = fabscxx . . $ fabs(fbcf3211dfe1bfd1).(from_ground *cxx . . $ `operator*`(4a721543d64e126a). orient.uveccxx . . $ matrix#uvec.); |
| 3461 | |
| 3462 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Humonculous#memory.->max_speedcxx . . $ humonculous_data#max_speed.); |
| 3463 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Humonculous#memory.->max_delta_speedcxx . . $ humonculous_data#max_delta_speed.); |
| 3464 | |
| 3465 | memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[0] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Joshbot", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2, 0, true, true); |
| 3466 | flags = PF_NO_COLLIDE_PARENTcxx . . $ `Descent3/object_external.h:326:9`!; |
| 3467 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[0], VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3468 | flags = OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 3469 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[0], VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 3470 | |
| 3471 | // CreateAndAttach(me, "Joshbot", OBJ_ROBOT, 3, 0 ,true, false); |
| 3472 | memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[1] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Joshbot", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 4, 0, true, true); |
| 3473 | flags = PF_NO_COLLIDE_PARENTcxx . . $ `Descent3/object_external.h:326:9`!; |
| 3474 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[1], VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3475 | flags = OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 3476 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[1], VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 3477 | |
| 3478 | memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[0] = Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("BossRock01"); |
| 3479 | memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[1] = Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("BossRock02"); |
| 3480 | memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[2] = Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("BossRock03"); |
| 3481 | memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[3] = Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("BossRock04"); |
| 3482 | memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[4] = Scrpt_FindObjectNamecxx . . $ Scrpt_FindObjectName.("BossRock05"); |
| 3483 | |
| 3484 | CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Humonbodyarmor", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0, true, false); |
| 3485 | CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Humonwristarmor", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0, true, false); |
| 3486 | |
| 3487 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_IDLEcxx . . $ `scripts/AIGame.cpp:3062:9`!); |
| 3488 | } |
| 3489 | |
| 3490 | void Humonculouscxx . . $ Humonculous#::DoIntervalcxx . . $ Humonculous#DoInterval(d4f767463ce0a6b3).(int me) { |
| 3491 | int flags; |
| 3492 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 3493 | |
| 3494 | // float frame; |
| 3495 | // Obj_Value(me, VF_GET, OBJV_F_ANIM_FRAME, &frame); |
| 3496 | // mprintf(0, "Anim frame is %f\n", frame); |
| 3497 | float shields; |
| 3498 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 3499 | |
| 3500 | if (shields < memorycxx . . $ Humonculous#memory.->force_mid_damage_shieldscxx . . $ humonculous_data#force_mid_damage_shields. && !(memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_MID_DAMAGE_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3102:9`!)) { |
| 3501 | char anim_type; |
| 3502 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 3503 | |
| 3504 | if (anim_type != AS_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:442:9`! && anim_type != AS_MELEE1cxx . . $ `Descent3/aistruct_external.h:415:9`! && anim_type != AS_MELEE2cxx . . $ `Descent3/aistruct_external.h:417:9`!) |
| 3505 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`!); |
| 3506 | } |
| 3507 | |
| 3508 | if (shields < memorycxx . . $ Humonculous#memory.->force_wall_hit_shieldscxx . . $ humonculous_data#force_wall_hit_shields. && !(memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_HIT_WALL_ASSIGNEDcxx . . $ `scripts/AIGame.cpp:3101:9`!)) { |
| 3509 | char anim_type; |
| 3510 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 3511 | |
| 3512 | if (anim_type != AS_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:442:9`! && anim_type != AS_MELEE1cxx . . $ `Descent3/aistruct_external.h:415:9`! && anim_type != AS_MELEE2cxx . . $ `Descent3/aistruct_external.h:417:9`!) { |
| 3513 | mprintfcxx . . $ mprintf.(0, "HEHRE HERHERHERHERHEHREHRHERHEHREHR\n"); |
| 3514 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!); |
| 3515 | } |
| 3516 | } |
| 3517 | |
| 3518 | if ((memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. < HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!) && (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!)) { |
| 3519 | char anim_type; |
| 3520 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 3521 | |
| 3522 | if (anim_type != AS_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:442:9`! && anim_type != AS_MELEE1cxx . . $ `Descent3/aistruct_external.h:415:9`! && anim_type != AS_MELEE2cxx . . $ `Descent3/aistruct_external.h:417:9`!) |
| 3523 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!); |
| 3524 | } |
| 3525 | |
| 3526 | if (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. == HM_DEATH_CHARGEcxx . . $ `scripts/AIGame.cpp:3070:9`! && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 4.0f && (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!)) { |
| 3527 | char anim_type; |
| 3528 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 3529 | |
| 3530 | if (anim_type != AS_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:442:9`! && anim_type != AS_MELEE1cxx . . $ `Descent3/aistruct_external.h:415:9`! && anim_type != AS_MELEE2cxx . . $ `Descent3/aistruct_external.h:417:9`!) |
| 3531 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`!); |
| 3532 | } |
| 3533 | |
| 3534 | switch (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode.) { |
| 3535 | case HM_INTRO_CUTSCENEcxx . . $ `scripts/AIGame.cpp:3063:9`!: { |
| 3536 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. < H_DOOR_WAIT_TIMEcxx . . $ `scripts/AIGame.cpp:3076:9`! && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= H_DOOR_WAIT_TIMEcxx . . $ `scripts/AIGame.cpp:3076:9`!) { |
| 3537 | vectorcxx . . $ vector# velocity = Zero_vectorcxx . . $ Zero_vector.; |
| 3538 | velocity.ycxx . . $ vector#y. = 65.0f; |
| 3539 | |
| 3540 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 3541 | |
| 3542 | int flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 3543 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3544 | |
| 3545 | float awareness = AWARE_FULLYcxx . . $ `Descent3/aistruct_external.h:323:9`!; |
| 3546 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 3547 | } |
| 3548 | } break; |
| 3549 | case HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!: |
| 3550 | case HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!: { |
| 3551 | bool f_force_melee; |
| 3552 | int target_handle; |
| 3553 | |
| 3554 | msafe_structcxx . . $ msafe_struct# m; |
| 3555 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 3556 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &m); |
| 3557 | |
| 3558 | f_force_melee = (m.shieldscxx . . $ msafe_struct#shields. < memorycxx . . $ Humonculous#memory.->force_melee_shieldscxx . . $ humonculous_data#force_melee_shields.); |
| 3559 | |
| 3560 | if (f_force_melee) |
| 3561 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_VERY_HURTcxx . . $ `scripts/AIGame.cpp:3094:9`!; |
| 3562 | else |
| 3563 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. &= ~HF_VERY_HURTcxx . . $ `scripts/AIGame.cpp:3094:9`!; |
| 3564 | |
| 3565 | if (!f_force_melee) { |
| 3566 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 3567 | |
| 3568 | if (target_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 3569 | float dist; |
| 3570 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_DIST_TO_TARGETcxx . . $ `scripts/osiris_common.h:526:9`!, &dist); |
| 3571 | |
| 3572 | if (dist < H_MELEE_DISTcxx . . $ `scripts/AIGame.cpp:3113:9`!) { |
| 3573 | f_force_melee = true; |
| 3574 | } |
| 3575 | } |
| 3576 | } |
| 3577 | |
| 3578 | if ((!f_force_melee) && (memorycxx . . $ Humonculous#memory.->next_mode_timecxx . . $ humonculous_data#next_mode_time. < Game_GetTimecxx . . $ Game_GetTime.())) { |
| 3579 | memorycxx . . $ Humonculous#memory.->next_mode_timecxx . . $ humonculous_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + 3.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 2.0f; |
| 3580 | |
| 3581 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 150) > 10) { |
| 3582 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!); |
| 3583 | } else { |
| 3584 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!); |
| 3585 | } |
| 3586 | } else if ((f_force_melee) && (memorycxx . . $ Humonculous#memory.->modecxx . . $ humonculous_data#mode. != HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!)) { |
| 3587 | // PlaySoundObj3d("RbtStingeattack1", me) |
| 3588 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_MELEEcxx . . $ `scripts/AIGame.cpp:3065:9`!); |
| 3589 | } |
| 3590 | } break; |
| 3591 | |
| 3592 | case HM_MID_DAMAGE_TAUNTcxx . . $ `scripts/AIGame.cpp:3067:9`!: { |
| 3593 | float frame; |
| 3594 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &frame); |
| 3595 | |
| 3596 | if (frame >= 360.0f && frame <= 420.0f) { |
| 3597 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_DID_MID_DAMAGEcxx . . $ `scripts/AIGame.cpp:3099:9`!; |
| 3598 | |
| 3599 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. < 4.53f && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 4.53f) { |
| 3600 | int xxx; |
| 3601 | matrixcxx . . $ matrix# orient; |
| 3602 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 3603 | |
| 3604 | // Launch joshbots |
| 3605 | for (xxx = 0; xxx < 2; xxx++) { |
| 3606 | int flags = OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!; |
| 3607 | vectorcxx . . $ vector# vel = orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 80.0f; |
| 3608 | |
| 3609 | Obj_UnattachFromParentcxx . . $ Obj_UnattachFromParent.(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[xxx]); |
| 3610 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[xxx], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 3611 | |
| 3612 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->joshcxx . . $ humonculous_data#josh.[xxx], VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 3613 | } |
| 3614 | } |
| 3615 | } |
| 3616 | |
| 3617 | if ((memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_DID_MID_DAMAGEcxx . . $ `scripts/AIGame.cpp:3099:9`!) && !(frame >= 360.0f && frame <= 420.0f)) { |
| 3618 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!); |
| 3619 | } |
| 3620 | } break; |
| 3621 | |
| 3622 | case HM_WALL_HITcxx . . $ `scripts/AIGame.cpp:3066:9`!: { |
| 3623 | char anim_type; |
| 3624 | char next_anim_type; |
| 3625 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 3626 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_NEXT_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:521:9`!, &next_anim_type); |
| 3627 | |
| 3628 | float frame; |
| 3629 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &frame); |
| 3630 | |
| 3631 | if ((memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_HIT_WALLcxx . . $ `scripts/AIGame.cpp:3098:9`!) == 0) { |
| 3632 | |
| 3633 | if (frame >= 101.0f && frame <= 125.0f) { |
| 3634 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_HIT_WALLcxx . . $ `scripts/AIGame.cpp:3098:9`!; |
| 3635 | } |
| 3636 | } else if (frame >= 110.0f && !(memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_HIT_WALL_SHAKEDcxx . . $ `scripts/AIGame.cpp:3100:9`!)) { |
| 3637 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_HIT_WALL_SHAKEDcxx . . $ `scripts/AIGame.cpp:3100:9`!; |
| 3638 | |
| 3639 | // shake players at wall hit |
| 3640 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 3641 | mstruct.amountcxx . . $ msafe_struct#amount. = 65.0f; |
| 3642 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_VIEWER_SHAKEcxx . . $ `scripts/osiris_common.h:843:9`!, &mstruct); |
| 3643 | |
| 3644 | int i; |
| 3645 | char mtype = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 3646 | for (i = 0; i < 5; i++) { |
| 3647 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Humonculous#memory.->rockscxx . . $ humonculous_data#rocks.[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &mtype); |
| 3648 | } |
| 3649 | } |
| 3650 | |
| 3651 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 4.0f && anim_type != AS_CUSTOMcxx . . $ `Descent3/aistruct_external.h:445:9`! && next_anim_type != AS_CUSTOMcxx . . $ `Descent3/aistruct_external.h:445:9`! && |
| 3652 | (memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_HIT_WALLcxx . . $ `scripts/AIGame.cpp:3098:9`!)) { |
| 3653 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!); |
| 3654 | } else if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 15.0f && |
| 3655 | anim_type != AS_CUSTOMcxx . . $ `Descent3/aistruct_external.h:445:9`!) // Safety case - if there is a messup, return to ranged (worked fine) |
| 3656 | { |
| 3657 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_RANGEDcxx . . $ `scripts/AIGame.cpp:3064:9`!); |
| 3658 | } |
| 3659 | } break; |
| 3660 | |
| 3661 | case HM_ABOUT_TO_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3068:9`!: { |
| 3662 | if (memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_AT_FDPOScxx . . $ `scripts/AIGame.cpp:3103:9`!) { |
| 3663 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. < 6.0f && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 6.0f) { |
| 3664 | vectorcxx . . $ vector# start_pos; |
| 3665 | int start_room; |
| 3666 | vectorcxx . . $ vector# end_pos; |
| 3667 | |
| 3668 | ray_infocxx . . $ ray_info# ray; |
| 3669 | |
| 3670 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &start_pos); |
| 3671 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &start_room); |
| 3672 | end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). start_pos; |
| 3673 | end_pos.ycxx . . $ vector#y. -= 2000.0f; |
| 3674 | |
| 3675 | int flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 3676 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 3677 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 3678 | |
| 3679 | memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ray.hit_pointcxx . . $ ray_info#hit_point.; |
| 3680 | memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos..ycxx . . $ vector#y. += memorycxx . . $ Humonculous#memory.->ground_pnt_offsetcxx . . $ humonculous_data#ground_pnt_offset.; |
| 3681 | |
| 3682 | float max_speed = 20.0f; |
| 3683 | float max_delta_speed = 50.0f; |
| 3684 | |
| 3685 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &max_speed); |
| 3686 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &max_delta_speed); |
| 3687 | |
| 3688 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`!, |
| 3689 | GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos., ray.hit_roomcxx . . $ ray_info#hit_room.); |
| 3690 | |
| 3691 | float dist = 0.0f; |
| 3692 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 3693 | |
| 3694 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 3695 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3696 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 3697 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3698 | |
| 3699 | matrixcxx . . $ matrix# orient; |
| 3700 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 3701 | |
| 3702 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.fveccxx . . $ matrix#fvec.; |
| 3703 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec..ycxx . . $ vector#y. = 0.0f; |
| 3704 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec.); |
| 3705 | } |
| 3706 | |
| 3707 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 15.0f && (memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_LANDEDcxx . . $ `scripts/AIGame.cpp:3096:9`!) && (memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_ORIENTEDcxx . . $ `scripts/AIGame.cpp:3097:9`!)) { |
| 3708 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`!); |
| 3709 | } |
| 3710 | } |
| 3711 | |
| 3712 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 60.0f) { |
| 3713 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`!); |
| 3714 | } |
| 3715 | } break; |
| 3716 | |
| 3717 | case HM_FAKE_DEATHcxx . . $ `scripts/AIGame.cpp:3069:9`!: { |
| 3718 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 4.0f) { |
| 3719 | vectorcxx . . $ vector# velocity = Zero_vectorcxx . . $ Zero_vector.; |
| 3720 | velocity.ycxx . . $ vector#y. = 40.0f; |
| 3721 | |
| 3722 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 3723 | SetModecxx . . $ Humonculous#SetMode(52ddc979177e3042).(me, HM_DEATH_CHARGEcxx . . $ `scripts/AIGame.cpp:3070:9`!); |
| 3724 | } |
| 3725 | } break; |
| 3726 | |
| 3727 | case HM_ABOUT_TO_DIEcxx . . $ `scripts/AIGame.cpp:3071:9`!: { |
| 3728 | if (memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3104:9`!) { |
| 3729 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. < 10.0f && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 10.0f) { |
| 3730 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 3731 | } |
| 3732 | |
| 3733 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. < 12.5f && memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 12.5f) { |
| 3734 | vectorcxx . . $ vector# start_pos; |
| 3735 | int start_room; |
| 3736 | vectorcxx . . $ vector# end_pos; |
| 3737 | |
| 3738 | ray_infocxx . . $ ray_info# ray; |
| 3739 | |
| 3740 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &start_pos); |
| 3741 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &start_room); |
| 3742 | end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). start_pos; |
| 3743 | end_pos.ycxx . . $ vector#y. -= 2000.0f; |
| 3744 | |
| 3745 | int flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 3746 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 3747 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 3748 | |
| 3749 | memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ray.hit_pointcxx . . $ ray_info#hit_point.; |
| 3750 | memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos..ycxx . . $ vector#y. += memorycxx . . $ Humonculous#memory.->ground_pnt_offsetcxx . . $ humonculous_data#ground_pnt_offset.; |
| 3751 | |
| 3752 | float max_speed = 20.0f; |
| 3753 | float max_delta_speed = 50.0f; |
| 3754 | |
| 3755 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &max_speed); |
| 3756 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &max_delta_speed); |
| 3757 | |
| 3758 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, H_GUID_LANDEDcxx . . $ `scripts/AIGame.cpp:3106:9`!, |
| 3759 | GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &memorycxx . . $ Humonculous#memory.->land_poscxx . . $ humonculous_data#land_pos., ray.hit_roomcxx . . $ ray_info#hit_room.); |
| 3760 | |
| 3761 | float dist = 0.0f; |
| 3762 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 3763 | |
| 3764 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 3765 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3766 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 3767 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 3768 | |
| 3769 | matrixcxx . . $ matrix# orient; |
| 3770 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 3771 | |
| 3772 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.fveccxx . . $ matrix#fvec.; |
| 3773 | memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec..ycxx . . $ vector#y. = 0.0f; |
| 3774 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&memorycxx . . $ Humonculous#memory.->land_fveccxx . . $ humonculous_data#land_fvec.); |
| 3775 | } |
| 3776 | } |
| 3777 | |
| 3778 | if (memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. > 45.0f && !(memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. & HF_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3104:9`!)) { |
| 3779 | memorycxx . . $ Humonculous#memory.->flagscxx . . $ humonculous_data#flags. |= HF_AT_RDPOScxx . . $ `scripts/AIGame.cpp:3104:9`!; |
| 3780 | memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. = 0.0f; |
| 3781 | |
| 3782 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 3783 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 3784 | |
| 3785 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 242.0f, 350.0f, 15.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtHmclDeath"), -1); |
| 3786 | } |
| 3787 | } break; |
| 3788 | } |
| 3789 | |
| 3790 | memorycxx . . $ Humonculous#memory.->last_shieldscxx . . $ humonculous_data#last_shields. = shields; |
| 3791 | memorycxx . . $ Humonculous#memory.->mode_timecxx . . $ humonculous_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 3792 | } |
| 3793 | |
| 3794 | int16_t Humonculouscxx . . $ Humonculous#::CallEventcxx . . $ Humonculous#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3795 | switch (event) { |
| 3796 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3797 | DoInitcxx . . $ Humonculous#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3798 | break; |
| 3799 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 3800 | DoIntervalcxx . . $ Humonculous#DoInterval(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3801 | break; |
| 3802 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 3803 | return (DoNotifycxx . . $ Humonculous#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 3804 | break; |
| 3805 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 3806 | memorycxx . . $ Humonculous#memory. = (humonculous_datacxx . . $ humonculous_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 3807 | } break; |
| 3808 | } |
| 3809 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 3810 | } |
| 3811 | |
| 3812 | // -------------- |
| 3813 | // Dragon |
| 3814 | // -------------- |
| 3815 | |
| 3816 | void Dragoncxx . . $ Dragon#::DoInitcxx . . $ Dragon#DoInit(d4f767463ce0a6b3).(int me) { |
| 3817 | int i; |
| 3818 | |
| 3819 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 3820 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 3821 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(dragon_datacxx . . $ dragon_data#); |
| 3822 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 3823 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 3824 | |
| 3825 | memorycxx . . $ Dragon#memory. = (dragon_datacxx . . $ dragon_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 3826 | |
| 3827 | memorycxx . . $ Dragon#memory.->head_objectcxx . . $ dragon_data#head_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Dragonhead", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0); |
| 3828 | memorycxx . . $ Dragon#memory.->tail_objectcxx . . $ dragon_data#tail_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Dragontail", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 6); |
| 3829 | memorycxx . . $ Dragon#memory.->green_turretcxx . . $ dragon_data#green_turret. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Dragonturret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2, 0); |
| 3830 | |
| 3831 | for (i = 0; i < 6; i++) { |
| 3832 | memorycxx . . $ Dragon#memory.->tcxx . . $ dragon_data#t.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Dragon#memory.->tail_objectcxx . . $ dragon_data#tail_object., "Dragontailturret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, i, 1); |
| 3833 | memorycxx . . $ Dragon#memory.->tentaclecxx . . $ dragon_data#tentacle.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Dragon#memory.->tcxx . . $ dragon_data#t.[i], "Dragontentacle", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 3834 | } |
| 3835 | |
| 3836 | memorycxx . . $ Dragon#memory.->modecxx . . $ dragon_data#mode. = DRAGON_ARMORcxx . . $ `scripts/AIGame.cpp:519:9`!; |
| 3837 | |
| 3838 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 3839 | } |
| 3840 | |
| 3841 | int16_t Dragoncxx . . $ Dragon#::CallEventcxx . . $ Dragon#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3842 | switch (event) { |
| 3843 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3844 | DoInitcxx . . $ Dragon#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3845 | break; |
| 3846 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 3847 | memorycxx . . $ Dragon#memory. = (dragon_datacxx . . $ dragon_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 3848 | } break; |
| 3849 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 3850 | int i; |
| 3851 | |
| 3852 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Dragon#memory.->head_objectcxx . . $ dragon_data#head_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 3853 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 3854 | 0.0f, 0.0f); |
| 3855 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Dragon#memory.->tail_objectcxx . . $ dragon_data#tail_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 3856 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 3857 | 0.0f, 0.0f); |
| 3858 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Dragon#memory.->green_turretcxx . . $ dragon_data#green_turret., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 3859 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 3860 | 0.0f, 0.0f); |
| 3861 | for (i = 0; i < 6; i++) { |
| 3862 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Dragon#memory.->tcxx . . $ dragon_data#t.[i], OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 3863 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 3864 | 0.0f, 0.0f); |
| 3865 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Dragon#memory.->tentaclecxx . . $ dragon_data#tentacle.[i], OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 3866 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 3867 | 0.0f, 0.0f); |
| 3868 | } |
| 3869 | } break; |
| 3870 | } |
| 3871 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 3872 | } |
| 3873 | |
| 3874 | //----------- |
| 3875 | // Tracker |
| 3876 | //----------- |
| 3877 | |
| 3878 | void Trackercxx . . $ Tracker#::DoInitcxx . . $ Tracker#DoInit(d4f767463ce0a6b3).(int me) { |
| 3879 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 3880 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 3881 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tracker_datacxx . . $ tracker_data#); |
| 3882 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 3883 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 3884 | |
| 3885 | memorycxx . . $ Tracker#memory. = (tracker_datacxx . . $ tracker_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 3886 | |
| 3887 | memorycxx . . $ Tracker#memory.->turret_objectcxx . . $ tracker_data#turret_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Trackerturret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0); |
| 3888 | memorycxx . . $ Tracker#memory.->hatch_objectcxx . . $ tracker_data#hatch_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Trackerhatch", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 3889 | |
| 3890 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 3891 | } |
| 3892 | |
| 3893 | int16_t Trackercxx . . $ Tracker#::CallEventcxx . . $ Tracker#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3894 | switch (event) { |
| 3895 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3896 | DoInitcxx . . $ Tracker#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3897 | break; |
| 3898 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 3899 | memorycxx . . $ Tracker#memory. = (tracker_datacxx . . $ tracker_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 3900 | } break; |
| 3901 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 3902 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 3903 | |
| 3904 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Tracker#memory.->hatch_objectcxx . . $ tracker_data#hatch_object.; |
| 3905 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 3906 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 3907 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 3908 | |
| 3909 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 3910 | |
| 3911 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Tracker#memory.->turret_objectcxx . . $ tracker_data#turret_object.; |
| 3912 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 3913 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 3914 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 3915 | |
| 3916 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 3917 | } break; |
| 3918 | } |
| 3919 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 3920 | } |
| 3921 | |
| 3922 | // -------------- |
| 3923 | // Lance |
| 3924 | // -------------- |
| 3925 | |
| 3926 | void Lancecxx . . $ Lance#::DoInitcxx . . $ Lance#DoInit(d4f767463ce0a6b3).(int me) { |
| 3927 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 3928 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 3929 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(lance_datacxx . . $ lance_data#); |
| 3930 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 3931 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 3932 | |
| 3933 | memorycxx . . $ Lance#memory. = (lance_datacxx . . $ lance_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 3934 | |
| 3935 | memorycxx . . $ Lance#memory.->modecxx . . $ lance_data#mode. = LANCE_MOVINGcxx . . $ `scripts/AIGame.cpp:567:9`!; |
| 3936 | } |
| 3937 | |
| 3938 | void Lancecxx . . $ Lance#::DoFramecxx . . $ Lance#DoFrame(d4f767463ce0a6b3).(int me) { |
| 3939 | float frame; |
| 3940 | |
| 3941 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:659:9`!, &frame); |
| 3942 | |
| 3943 | if (frame > 2.0f && frame < 6.0f) { |
| 3944 | if (memorycxx . . $ Lance#memory.->modecxx . . $ lance_data#mode. == LANCE_MOVINGcxx . . $ `scripts/AIGame.cpp:567:9`!) { |
| 3945 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 3946 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3947 | memorycxx . . $ Lance#memory.->modecxx . . $ lance_data#mode. = LANCE_PAUSEDcxx . . $ `scripts/AIGame.cpp:566:9`!; |
| 3948 | } |
| 3949 | } else if (memorycxx . . $ Lance#memory.->modecxx . . $ lance_data#mode. == LANCE_PAUSEDcxx . . $ `scripts/AIGame.cpp:566:9`!) { |
| 3950 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 3951 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 3952 | memorycxx . . $ Lance#memory.->modecxx . . $ lance_data#mode. = LANCE_MOVINGcxx . . $ `scripts/AIGame.cpp:567:9`!; |
| 3953 | } |
| 3954 | } |
| 3955 | |
| 3956 | int16_t Lancecxx . . $ Lance#::CallEventcxx . . $ Lance#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3957 | switch (event) { |
| 3958 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3959 | DoInitcxx . . $ Lance#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3960 | break; |
| 3961 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 3962 | DoFramecxx . . $ Lance#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3963 | break; |
| 3964 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 3965 | memorycxx . . $ Lance#memory. = (lance_datacxx . . $ lance_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 3966 | } break; |
| 3967 | } |
| 3968 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 3969 | } |
| 3970 | |
| 3971 | // -------------- |
| 3972 | // Flak |
| 3973 | // -------------- |
| 3974 | |
| 3975 | void Flakcxx . . $ Flak#::DoInitcxx . . $ Flak#DoInit(d4f767463ce0a6b3).(int me) { |
| 3976 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 3977 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 3978 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(flak_datacxx . . $ flak_data#); |
| 3979 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 3980 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 3981 | |
| 3982 | memorycxx . . $ Flak#memory. = (flak_datacxx . . $ flak_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 3983 | |
| 3984 | memorycxx . . $ Flak#memory.->canopy_handlecxx . . $ flak_data#canopy_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Flakcanopy", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 3985 | memorycxx . . $ Flak#memory.->f_deadcxx . . $ flak_data#f_dead. = false; |
| 3986 | |
| 3987 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 3988 | } |
| 3989 | |
| 3990 | int16_t Flakcxx . . $ Flak#::CallEventcxx . . $ Flak#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 3991 | switch (event) { |
| 3992 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 3993 | DoInitcxx . . $ Flak#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 3994 | break; |
| 3995 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 3996 | if (!memorycxx . . $ Flak#memory.->f_deadcxx . . $ flak_data#f_dead.) { |
| 3997 | int type; |
| 3998 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Flak#memory.->canopy_handlecxx . . $ flak_data#canopy_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 3999 | if (type != OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 4000 | char ctype = CT_NONEcxx . . $ `Descent3/object_external.h:216:9`!; |
| 4001 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:637:9`!, &ctype); |
| 4002 | |
| 4003 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 4004 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 4005 | |
| 4006 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4007 | |
| 4008 | mstruct.randomcxx . . $ msafe_struct#random. = 21; |
| 4009 | mstruct.is_realcxx . . $ msafe_struct#is_real. = 0; |
| 4010 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 4011 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = -2; |
| 4012 | mstruct.effect_typecxx . . $ msafe_struct#effect_type. = MED_SMOKE_INDEXcxx . . $ `Descent3/fireball_external.h:29:9`!; |
| 4013 | mstruct.phys_infocxx . . $ msafe_struct#phys_info. = 0; |
| 4014 | mstruct.dragcxx . . $ msafe_struct#drag. = .001f; |
| 4015 | mstruct.masscxx . . $ msafe_struct#mass. = .001f; |
| 4016 | mstruct.intervalcxx . . $ msafe_struct#interval. = .1f; |
| 4017 | mstruct.longevitycxx . . $ msafe_struct#longevity. = 5.0f; |
| 4018 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 1.0; |
| 4019 | mstruct.sizecxx . . $ msafe_struct#size. = 6.0f; |
| 4020 | mstruct.speedcxx . . $ msafe_struct#speed. = 25.0; |
| 4021 | |
| 4022 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!, &mstruct); |
| 4023 | |
| 4024 | memorycxx . . $ Flak#memory.->f_deadcxx . . $ flak_data#f_dead. = true; |
| 4025 | memorycxx . . $ Flak#memory.->death_timecxx . . $ flak_data#death_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 4026 | } |
| 4027 | } else { |
| 4028 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ Flak#memory.->death_timecxx . . $ flak_data#death_time. + 5.0f) { |
| 4029 | Obj_Killcxx . . $ Obj_Kill.(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4030 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 4031 | 0.0f, 0.0f); |
| 4032 | } |
| 4033 | } |
| 4034 | } break; |
| 4035 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4036 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Flak#memory.->canopy_handlecxx . . $ flak_data#canopy_handle., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4037 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 4038 | 0.0f, 0.0f); |
| 4039 | break; |
| 4040 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4041 | memorycxx . . $ Flak#memory. = (flak_datacxx . . $ flak_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4042 | } break; |
| 4043 | } |
| 4044 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4045 | } |
| 4046 | |
| 4047 | //--------------- |
| 4048 | // Super Trooper |
| 4049 | //--------------- |
| 4050 | |
| 4051 | void SuperTroopercxx . . $ SuperTrooper#::DoInitcxx . . $ SuperTrooper#DoInit(d4f767463ce0a6b3).(int me) { |
| 4052 | msafe_structcxx . . $ msafe_struct# m; |
| 4053 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 4054 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!, &m); |
| 4055 | int st_id = Obj_FindIDcxx . . $ Obj_FindID.("supertrooper"); |
| 4056 | |
| 4057 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4058 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4059 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(supertrooper_datacxx . . $ supertrooper_data#); |
| 4060 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4061 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4062 | |
| 4063 | memorycxx . . $ SuperTrooper#memory. = (supertrooper_datacxx . . $ supertrooper_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4064 | |
| 4065 | if (m.idcxx . . $ msafe_struct#id. == st_id) { |
| 4066 | memorycxx . . $ SuperTrooper#memory.->body_handlecxx . . $ supertrooper_data#body_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "supertorso", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 4067 | } else { |
| 4068 | memorycxx . . $ SuperTrooper#memory.->body_handlecxx . . $ supertrooper_data#body_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "red supertorso", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 4069 | } |
| 4070 | |
| 4071 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 4072 | } |
| 4073 | |
| 4074 | int16_t SuperTroopercxx . . $ SuperTrooper#::CallEventcxx . . $ SuperTrooper#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4075 | switch (event) { |
| 4076 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 4077 | int body_handle = Obj_GetAttachChildHandlecxx . . $ Obj_GetAttachChildHandle.(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 0); |
| 4078 | if (body_handle != memorycxx . . $ SuperTrooper#memory.->body_handlecxx . . $ supertrooper_data#body_handle.) { |
| 4079 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4080 | |
| 4081 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 4082 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 4083 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 4084 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 4085 | |
| 4086 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 4087 | } |
| 4088 | } break; |
| 4089 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4090 | DoInitcxx . . $ SuperTrooper#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4091 | break; |
| 4092 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 4093 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4094 | |
| 4095 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ SuperTrooper#memory.->body_handlecxx . . $ supertrooper_data#body_handle.; |
| 4096 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 4097 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 4098 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 4099 | |
| 4100 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 4101 | } break; |
| 4102 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4103 | memorycxx . . $ SuperTrooper#memory. = (supertrooper_datacxx . . $ supertrooper_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4104 | } break; |
| 4105 | } |
| 4106 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4107 | } |
| 4108 | |
| 4109 | //--------------- |
| 4110 | // Juggernaut |
| 4111 | //--------------- |
| 4112 | |
| 4113 | void Juggcxx . . $ Jugg#::SetModecxx . . $ Jugg#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 4114 | switch (mode) { |
| 4115 | case JUGG_NORMALcxx . . $ `scripts/AIGame.cpp:1021:9`!: |
| 4116 | break; |
| 4117 | case JUGG_DYINGcxx . . $ `scripts/AIGame.cpp:1022:9`!: { |
| 4118 | char type = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 4119 | char aimtype = MC_STANDINGcxx . . $ `Descent3/object_external.h:245:9`!; |
| 4120 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &type); |
| 4121 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:518:9`!, &aimtype); |
| 4122 | |
| 4123 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 8.0f, 20.0f, 4.0f, 0, -1, -1); |
| 4124 | } break; |
| 4125 | } |
| 4126 | |
| 4127 | memorycxx . . $ Jugg#memory.->modecxx . . $ jugg_data#mode. = mode; |
| 4128 | memorycxx . . $ Jugg#memory.->mode_timecxx . . $ jugg_data#mode_time. = 0.0f; |
| 4129 | } |
| 4130 | |
| 4131 | void Juggcxx . . $ Jugg#::DoInitcxx . . $ Jugg#DoInit(d4f767463ce0a6b3).(int me) { |
| 4132 | int head_object; |
| 4133 | int belly_object; |
| 4134 | int turret_object; |
| 4135 | int flame_object; |
| 4136 | int i; |
| 4137 | |
| 4138 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4139 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4140 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(jugg_datacxx . . $ jugg_data#); |
| 4141 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4142 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4143 | |
| 4144 | memorycxx . . $ Jugg#memory. = (jugg_datacxx . . $ jugg_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4145 | |
| 4146 | memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Jugghead", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0); |
| 4147 | |
| 4148 | // Left |
| 4149 | memorycxx . . $ Jugg#memory.->head_turretcxx . . $ jugg_data#head_turret.[0] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object., "Juggheadturretright", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0); |
| 4150 | // Right |
| 4151 | memorycxx . . $ Jugg#memory.->head_turretcxx . . $ jugg_data#head_turret.[1] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object., "Juggheadturretleft", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2, 0); |
| 4152 | |
| 4153 | memorycxx . . $ Jugg#memory.->belly_objectcxx . . $ jugg_data#belly_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Juggbelly", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0); |
| 4154 | |
| 4155 | for (i = 0; i < 6; i++) { |
| 4156 | memorycxx . . $ Jugg#memory.->turret_objectcxx . . $ jugg_data#turret_object.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Jugg main turret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, i + 2, 0); |
| 4157 | } |
| 4158 | |
| 4159 | memorycxx . . $ Jugg#memory.->flame_turretcxx . . $ jugg_data#flame_turret.[0] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Jugg#memory.->belly_objectcxx . . $ jugg_data#belly_object., "Jugg flame turret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0); |
| 4160 | memorycxx . . $ Jugg#memory.->flame_turretcxx . . $ jugg_data#flame_turret.[1] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ Jugg#memory.->belly_objectcxx . . $ jugg_data#belly_object., "Jugg flame turret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2, 0); |
| 4161 | memorycxx . . $ Jugg#memory.->flame_turretcxx . . $ jugg_data#flame_turret.[2] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Jugg flame turret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 8, 0); |
| 4162 | |
| 4163 | memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. = 0; |
| 4164 | |
| 4165 | SetModecxx . . $ Jugg#SetMode(5016a63d0a5aceb0).(me, JUGG_NORMALcxx . . $ `scripts/AIGame.cpp:1021:9`!); |
| 4166 | |
| 4167 | memorycxx . . $ Jugg#memory.->foot_soundcxx . . $ jugg_data#foot_sound. = Sound_FindIdcxx . . $ Sound_FindId.("JugFootHit"); |
| 4168 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame.); |
| 4169 | } |
| 4170 | |
| 4171 | void Juggcxx . . $ Jugg#::DoFramecxx . . $ Jugg#DoFrame(d4f767463ce0a6b3).(int me) { |
| 4172 | float current_anim_frame; |
| 4173 | matrixcxx . . $ matrix# orient; |
| 4174 | int flags; |
| 4175 | |
| 4176 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, ¤t_anim_frame); |
| 4177 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 4178 | |
| 4179 | if (!(memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. & JUGG_F_HEAD_DEADcxx . . $ `scripts/AIGame.cpp:1025:9`!)) { |
| 4180 | int h_flags; |
| 4181 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &h_flags); |
| 4182 | |
| 4183 | if (h_flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) { |
| 4184 | memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. |= JUGG_F_HEAD_DEADcxx . . $ `scripts/AIGame.cpp:1025:9`!; |
| 4185 | AI_PowerSwitchcxx . . $ AI_PowerSwitch.(memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object., 0); |
| 4186 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(memorycxx . . $ Jugg#memory.->head_objectcxx . . $ jugg_data#head_object., 10.0f, 3.0f); |
| 4187 | } |
| 4188 | } |
| 4189 | |
| 4190 | if (!(memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. & JUGG_F_BODY_DEADcxx . . $ `scripts/AIGame.cpp:1026:9`!)) { |
| 4191 | if (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) { |
| 4192 | memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. |= JUGG_F_BODY_DEADcxx . . $ `scripts/AIGame.cpp:1026:9`!; |
| 4193 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 10.0f, 3.0f); |
| 4194 | } |
| 4195 | } |
| 4196 | |
| 4197 | if (memorycxx . . $ Jugg#memory.->modecxx . . $ jugg_data#mode. == JUGG_NORMALcxx . . $ `scripts/AIGame.cpp:1021:9`! && (memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. & JUGG_F_BODY_DEADcxx . . $ `scripts/AIGame.cpp:1026:9`!) && (memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. & JUGG_F_HEAD_DEADcxx . . $ `scripts/AIGame.cpp:1025:9`!)) { |
| 4198 | SetModecxx . . $ Jugg#SetMode(5016a63d0a5aceb0).(me, JUGG_DYINGcxx . . $ `scripts/AIGame.cpp:1022:9`!); |
| 4199 | } |
| 4200 | |
| 4201 | if (memorycxx . . $ Jugg#memory.->modecxx . . $ jugg_data#mode. == JUGG_DYINGcxx . . $ `scripts/AIGame.cpp:1022:9`! && current_anim_frame == 20.0f) { |
| 4202 | AI_PowerSwitchcxx . . $ AI_PowerSwitch.(me, 0); |
| 4203 | } |
| 4204 | |
| 4205 | if (current_anim_frame > 1.0f && memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame. <= 1.0f) { |
| 4206 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ Jugg#memory.->foot_soundcxx . . $ jugg_data#foot_sound.); |
| 4207 | } |
| 4208 | |
| 4209 | if (current_anim_frame > 3.0f && memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame. <= 3.0f) { |
| 4210 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ Jugg#memory.->foot_soundcxx . . $ jugg_data#foot_sound.); |
| 4211 | } |
| 4212 | |
| 4213 | if (current_anim_frame > 4.0f && memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame. <= 4.0f) { |
| 4214 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ Jugg#memory.->foot_soundcxx . . $ jugg_data#foot_sound.); |
| 4215 | } |
| 4216 | |
| 4217 | if (current_anim_frame > 7.0f && memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame. <= 7.0f) { |
| 4218 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ Jugg#memory.->foot_soundcxx . . $ jugg_data#foot_sound.); |
| 4219 | } |
| 4220 | |
| 4221 | memorycxx . . $ Jugg#memory.->mode_timecxx . . $ jugg_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 4222 | memorycxx . . $ Jugg#memory.->last_framecxx . . $ jugg_data#last_frame. = current_anim_frame; |
| 4223 | } |
| 4224 | |
| 4225 | int16_t Juggcxx . . $ Jugg#::CallEventcxx . . $ Jugg#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4226 | switch (event) { |
| 4227 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4228 | DoInitcxx . . $ Jugg#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4229 | break; |
| 4230 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 4231 | DoFramecxx . . $ Jugg#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4232 | break; |
| 4233 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 4234 | if (!(memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. & JUGG_F_BELLY_DEADcxx . . $ `scripts/AIGame.cpp:1024:9`!)) { |
| 4235 | int type; |
| 4236 | int i; |
| 4237 | |
| 4238 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Jugg#memory.->belly_objectcxx . . $ jugg_data#belly_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 4239 | |
| 4240 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 4241 | memorycxx . . $ Jugg#memory.->flagscxx . . $ jugg_data#flags. |= JUGG_F_BELLY_DEADcxx . . $ `scripts/AIGame.cpp:1024:9`!; |
| 4242 | |
| 4243 | for (i = 0; i < 3; i++) { |
| 4244 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Jugg#memory.->flame_turretcxx . . $ jugg_data#flame_turret.[i], OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4245 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | |
| 4246 | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 4247 | 0.0f, 0.0f); |
| 4248 | } |
| 4249 | } |
| 4250 | } |
| 4251 | } |
| 4252 | |
| 4253 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4254 | break; |
| 4255 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4256 | memorycxx . . $ Jugg#memory. = (jugg_datacxx . . $ jugg_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4257 | } break; |
| 4258 | } |
| 4259 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4260 | } |
| 4261 | |
| 4262 | //--------------- |
| 4263 | // Death Tower |
| 4264 | //--------------- |
| 4265 | |
| 4266 | void DTowercxx . . $ DTower#::DoInitcxx . . $ DTower#DoInit(d4f767463ce0a6b3).(int me) { |
| 4267 | int head_object; |
| 4268 | int belly_object; |
| 4269 | int turret_object; |
| 4270 | int flame_object; |
| 4271 | int i; |
| 4272 | |
| 4273 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4274 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4275 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(dtower_datacxx . . $ dtower_data#); |
| 4276 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4277 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4278 | |
| 4279 | memorycxx . . $ DTower#memory. = (dtower_datacxx . . $ dtower_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4280 | |
| 4281 | memorycxx . . $ DTower#memory.->gun_handlecxx . . $ dtower_data#gun_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Ltowergun", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 0, 0); |
| 4282 | memorycxx . . $ DTower#memory.->ball_handlecxx . . $ dtower_data#ball_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Ltowerball", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 1, 0); |
| 4283 | |
| 4284 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &memorycxx . . $ DTower#memory.->last_framecxx . . $ dtower_data#last_frame.); |
| 4285 | memorycxx . . $ DTower#memory.->f_diedcxx . . $ dtower_data#f_died. = false; |
| 4286 | } |
| 4287 | |
| 4288 | void DTowercxx . . $ DTower#::DoFramecxx . . $ DTower#DoFrame(d4f767463ce0a6b3).(int me) { |
| 4289 | float current_anim_frame; |
| 4290 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, ¤t_anim_frame); |
| 4291 | |
| 4292 | if (!memorycxx . . $ DTower#memory.->f_diedcxx . . $ dtower_data#f_died.) { |
| 4293 | int flags; |
| 4294 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 4295 | |
| 4296 | if (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) { |
| 4297 | memorycxx . . $ DTower#memory.->mode_timecxx . . $ dtower_data#mode_time. = 0.0f; |
| 4298 | memorycxx . . $ DTower#memory.->f_diedcxx . . $ dtower_data#f_died. = true; |
| 4299 | } |
| 4300 | } else if (memorycxx . . $ DTower#memory.->mode_timecxx . . $ dtower_data#mode_time. < 3.0f && memorycxx . . $ DTower#memory.->mode_timecxx . . $ dtower_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 3.0f) { |
| 4301 | int room; |
| 4302 | vectorcxx . . $ vector# pos; |
| 4303 | |
| 4304 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 4305 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, 1, &pos); |
| 4306 | |
| 4307 | int weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 4308 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 4309 | |
| 4310 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ DTower#memory.->gun_handlecxx . . $ dtower_data#gun_handle., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4311 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, 0.0f, |
| 4312 | 0.0f); |
| 4313 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 10.0f, 5.0f); |
| 4314 | |
| 4315 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 4316 | vel.ycxx . . $ vector#y. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 30.0f + 90.0f; |
| 4317 | vel.xcxx . . $ vector#x. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 16.0f - 8.0f; |
| 4318 | vel.zcxx . . $ vector#z. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 16.0f - 8.0f; |
| 4319 | |
| 4320 | Obj_UnattachFromParentcxx . . $ Obj_UnattachFromParent.(memorycxx . . $ DTower#memory.->ball_handlecxx . . $ dtower_data#ball_handle.); |
| 4321 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ DTower#memory.->ball_handlecxx . . $ dtower_data#ball_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 4322 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(memorycxx . . $ DTower#memory.->ball_handlecxx . . $ dtower_data#ball_handle., 15.0f, 3.0f); |
| 4323 | |
| 4324 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 0.0f, 10.0f, 2.0f, 0, -1, -1); |
| 4325 | } |
| 4326 | |
| 4327 | if (current_anim_frame == 10.0f) { |
| 4328 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4329 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, 0.0f, |
| 4330 | 0.0f); |
| 4331 | } |
| 4332 | |
| 4333 | memorycxx . . $ DTower#memory.->mode_timecxx . . $ dtower_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 4334 | memorycxx . . $ DTower#memory.->last_framecxx . . $ dtower_data#last_frame. = current_anim_frame; |
| 4335 | } |
| 4336 | |
| 4337 | int16_t DTowercxx . . $ DTower#::CallEventcxx . . $ DTower#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4338 | switch (event) { |
| 4339 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4340 | DoInitcxx . . $ DTower#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4341 | break; |
| 4342 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 4343 | DoFramecxx . . $ DTower#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4344 | break; |
| 4345 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4346 | break; |
| 4347 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4348 | memorycxx . . $ DTower#memory. = (dtower_datacxx . . $ dtower_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4349 | } break; |
| 4350 | } |
| 4351 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4352 | } |
| 4353 | |
| 4354 | //--------------- |
| 4355 | // Death Collector |
| 4356 | //--------------- |
| 4357 | |
| 4358 | void DCollectorcxx . . $ DCollector#::DoInitcxx . . $ DCollector#DoInit(d4f767463ce0a6b3).(int me) { |
| 4359 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4360 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4361 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(dcollector_datacxx . . $ dcollector_data#); |
| 4362 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4363 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4364 | |
| 4365 | memorycxx . . $ DCollector#memory. = (dcollector_datacxx . . $ dcollector_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4366 | |
| 4367 | memorycxx . . $ DCollector#memory.->target_handlecxx . . $ dcollector_data#target_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Collectortarget", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 0, 1); |
| 4368 | memorycxx . . $ DCollector#memory.->rod_handlecxx . . $ dcollector_data#rod_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ DCollector#memory.->target_handlecxx . . $ dcollector_data#target_handle., "Collectorrod", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 0, 0); |
| 4369 | memorycxx . . $ DCollector#memory.->ball_handlecxx . . $ dcollector_data#ball_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(memorycxx . . $ DCollector#memory.->rod_handlecxx . . $ dcollector_data#rod_handle., "Collectorball", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 1, 0); |
| 4370 | |
| 4371 | memorycxx . . $ DCollector#memory.->f_deadcxx . . $ dcollector_data#f_dead. = false; |
| 4372 | } |
| 4373 | |
| 4374 | void DCollectorcxx . . $ DCollector#::DoFramecxx . . $ DCollector#DoFrame(d4f767463ce0a6b3).(int me) { |
| 4375 | if (!memorycxx . . $ DCollector#memory.->f_deadcxx . . $ dcollector_data#f_dead.) { |
| 4376 | int type; |
| 4377 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ DCollector#memory.->target_handlecxx . . $ dcollector_data#target_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 4378 | |
| 4379 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 4380 | memorycxx . . $ DCollector#memory.->f_deadcxx . . $ dcollector_data#f_dead. = true; |
| 4381 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ DCollector#memory.->rod_handlecxx . . $ dcollector_data#rod_handle., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4382 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 4383 | 0.0f, 0.0f); |
| 4384 | |
| 4385 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 6.0f, 3.0f); |
| 4386 | |
| 4387 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 4388 | vel.ycxx . . $ vector#y. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 30.0f + 90.0f; |
| 4389 | vel.xcxx . . $ vector#x. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 8.0f - 4.0f; |
| 4390 | vel.zcxx . . $ vector#z. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 8.0f - 4.0f; |
| 4391 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ DCollector#memory.->ball_handlecxx . . $ dcollector_data#ball_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 4392 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(memorycxx . . $ DCollector#memory.->ball_handlecxx . . $ dcollector_data#ball_handle., 15.0f, 3.0f); |
| 4393 | } |
| 4394 | } |
| 4395 | } |
| 4396 | |
| 4397 | int16_t DCollectorcxx . . $ DCollector#::CallEventcxx . . $ DCollector#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4398 | switch (event) { |
| 4399 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4400 | DoInitcxx . . $ DCollector#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4401 | break; |
| 4402 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 4403 | DoFramecxx . . $ DCollector#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4404 | break; |
| 4405 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4406 | break; |
| 4407 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4408 | memorycxx . . $ DCollector#memory. = (dcollector_datacxx . . $ dcollector_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4409 | } break; |
| 4410 | } |
| 4411 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4412 | } |
| 4413 | |
| 4414 | //--------------- |
| 4415 | // Chemical Ball |
| 4416 | //--------------- |
| 4417 | |
| 4418 | void CBallcxx . . $ CBall#::DoInitcxx . . $ CBall#DoInit(d4f767463ce0a6b3).(int me) { |
| 4419 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4420 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4421 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(cball_datacxx . . $ cball_data#); |
| 4422 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4423 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4424 | |
| 4425 | memorycxx . . $ CBall#memory. = (cball_datacxx . . $ cball_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4426 | |
| 4427 | memorycxx . . $ CBall#memory.->f_picked_upcxx . . $ cball_data#f_picked_up. = false; |
| 4428 | memorycxx . . $ CBall#memory.->mode_timecxx . . $ cball_data#mode_time. = 0.0f; |
| 4429 | } |
| 4430 | |
| 4431 | void CBallcxx . . $ CBall#::DoFramecxx . . $ CBall#DoFrame(d4f767463ce0a6b3).(int me) { |
| 4432 | bool f_picked_up; |
| 4433 | |
| 4434 | f_picked_up = (Obj_GetAttachParentcxx . . $ Obj_GetAttachParent.(me) != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 4435 | |
| 4436 | if (!memorycxx . . $ CBall#memory.->f_picked_upcxx . . $ cball_data#f_picked_up. && f_picked_up) { |
| 4437 | memorycxx . . $ CBall#memory.->f_picked_upcxx . . $ cball_data#f_picked_up. = true; |
| 4438 | } else if (memorycxx . . $ CBall#memory.->f_picked_upcxx . . $ cball_data#f_picked_up. && !f_picked_up) { |
| 4439 | memorycxx . . $ CBall#memory.->mode_timecxx . . $ cball_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 4440 | |
| 4441 | if (memorycxx . . $ CBall#memory.->mode_timecxx . . $ cball_data#mode_time. > 12.0f) { |
| 4442 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 4443 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 4444 | 0.0f, 0.0f); |
| 4445 | } |
| 4446 | } |
| 4447 | } |
| 4448 | |
| 4449 | int16_t CBallcxx . . $ CBall#::CallEventcxx . . $ CBall#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4450 | switch (event) { |
| 4451 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: |
| 4452 | DoInitcxx . . $ CBall#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4453 | break; |
| 4454 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: |
| 4455 | DoFramecxx . . $ CBall#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4456 | break; |
| 4457 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4458 | break; |
| 4459 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4460 | memorycxx . . $ CBall#memory. = (cball_datacxx . . $ cball_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4461 | } break; |
| 4462 | } |
| 4463 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4464 | } |
| 4465 | |
| 4466 | //--------------- |
| 4467 | // Sixgun |
| 4468 | //--------------- |
| 4469 | |
| 4470 | void SixGuncxx . . $ SixGun#::DoInitcxx . . $ SixGun#DoInit(d4f767463ce0a6b3).(int me) { |
| 4471 | msafe_structcxx . . $ msafe_struct# m; |
| 4472 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 4473 | |
| 4474 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4475 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4476 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(sixgun_datacxx . . $ sixgun_data#); |
| 4477 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4478 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4479 | |
| 4480 | memorycxx . . $ SixGun#memory. = (sixgun_datacxx . . $ sixgun_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4481 | |
| 4482 | memorycxx . . $ SixGun#memory.->modecxx . . $ sixgun_data#mode. = 0; |
| 4483 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 4484 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 4485 | |
| 4486 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ SixGun#memory.->max_speedcxx . . $ sixgun_data#max_speed.); |
| 4487 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &memorycxx . . $ SixGun#memory.->circle_distcxx . . $ sixgun_data#circle_dist.); |
| 4488 | |
| 4489 | float temp = 0.0f; |
| 4490 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &temp); |
| 4491 | temp = 20.0f; |
| 4492 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &temp); |
| 4493 | } |
| 4494 | |
| 4495 | bool SixGuncxx . . $ SixGun#::DoNotifycxx . . $ SixGun#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 4496 | if (memorycxx . . $ SixGun#memory.->modecxx . . $ sixgun_data#mode. == 0) { |
| 4497 | if ((notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_OBJ_FIREDcxx . . $ `Descent3/aistruct_external.h:293:9`!) || (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_NEAR_TARGETcxx . . $ `Descent3/aistruct_external.h:298:9`!) || |
| 4498 | (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_HIT_BY_WEAPONcxx . . $ `Descent3/aistruct_external.h:299:9`!) || (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_BUMPED_OBJcxx . . $ `Descent3/aistruct_external.h:307:9`!)) { |
| 4499 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 4500 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 4501 | |
| 4502 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ SixGun#memory.->max_speedcxx . . $ sixgun_data#max_speed.); |
| 4503 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &memorycxx . . $ SixGun#memory.->circle_distcxx . . $ sixgun_data#circle_dist.); |
| 4504 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJcxx . . $ `Descent3/aistruct_external.h:200:9`!, 0, 1.0f, -1, GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, |
| 4505 | OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 4506 | memorycxx . . $ SixGun#memory.->modecxx . . $ sixgun_data#mode. = 1; |
| 4507 | } |
| 4508 | } |
| 4509 | |
| 4510 | return true; |
| 4511 | } |
| 4512 | |
| 4513 | int16_t SixGuncxx . . $ SixGun#::CallEventcxx . . $ SixGun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4514 | switch (event) { |
| 4515 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4516 | DoInitcxx . . $ SixGun#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4517 | break; |
| 4518 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 4519 | return (DoNotifycxx . . $ SixGun#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 4520 | break; |
| 4521 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4522 | break; |
| 4523 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4524 | memorycxx . . $ SixGun#memory. = (sixgun_datacxx . . $ sixgun_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4525 | } break; |
| 4526 | } |
| 4527 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4528 | } |
| 4529 | |
| 4530 | //--------------- |
| 4531 | // Explode Time Out |
| 4532 | //--------------- |
| 4533 | |
| 4534 | void ExplodeTimeOutcxx . . $ ExplodeTimeOut#::DoInitcxx . . $ ExplodeTimeOut#DoInit(d4f767463ce0a6b3).(int me) { |
| 4535 | msafe_structcxx . . $ msafe_struct# m; |
| 4536 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 4537 | |
| 4538 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 4539 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 4540 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(explodetimeout_datacxx . . $ explodetimeout_data#); |
| 4541 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 4542 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 4543 | |
| 4544 | memorycxx . . $ ExplodeTimeOut#memory. = (explodetimeout_datacxx . . $ explodetimeout_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 4545 | memorycxx . . $ ExplodeTimeOut#memory.->life_leftcxx . . $ explodetimeout_data#life_left. = 160.0f; |
| 4546 | } |
| 4547 | |
| 4548 | int16_t ExplodeTimeOutcxx . . $ ExplodeTimeOut#::CallEventcxx . . $ ExplodeTimeOut#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 4549 | switch (event) { |
| 4550 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 4551 | DoInitcxx . . $ ExplodeTimeOut#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 4552 | break; |
| 4553 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 4554 | memorycxx . . $ ExplodeTimeOut#memory.->life_leftcxx . . $ explodetimeout_data#life_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 4555 | if (memorycxx . . $ ExplodeTimeOut#memory.->life_leftcxx . . $ explodetimeout_data#life_left. <= 0.0f) { |
| 4556 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4557 | |
| 4558 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 4559 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 4560 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 4561 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 4562 | |
| 4563 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 4564 | } |
| 4565 | } break; |
| 4566 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 4567 | break; |
| 4568 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 4569 | memorycxx . . $ ExplodeTimeOut#memory. = (explodetimeout_datacxx . . $ explodetimeout_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 4570 | } break; |
| 4571 | } |
| 4572 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 4573 | } |
| 4574 | |
| 4575 | //--------------- |
| 4576 | // GuideBot |
| 4577 | //--------------- |
| 4578 | |
| 4579 | void GuideBotcxx . . $ GuideBot#::ReInitAmbientcxx . . $ GuideBot#ReInitAmbient(d4f767463ce0a6b3).(int me) { |
| 4580 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 1.0f; |
| 4581 | |
| 4582 | // In general, Turn on friend avoidance |
| 4583 | if (memorycxx . . $ GuideBot#memory.->last_commandcxx . . $ guidebot_data#last_command. != GBC_RETURN_TO_SHIPcxx . . $ `scripts/AIGame.cpp:1464:9`!) { |
| 4584 | int flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4585 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4586 | } |
| 4587 | |
| 4588 | int dir_index = randcxx . . $ rand(9efc7249d839d30e).() % 6; |
| 4589 | if (dir_index == GST_NEG_UVECcxx . . $ `Descent3/aistruct_external.h:269:9`!) |
| 4590 | dir_index = GST_NEG_RVECcxx . . $ `Descent3/aistruct_external.h:267:9`!; |
| 4591 | else if (dir_index == GST_UVECcxx . . $ `Descent3/aistruct_external.h:268:9`!) |
| 4592 | dir_index = GST_RVECcxx . . $ `Descent3/aistruct_external.h:266:9`!; |
| 4593 | |
| 4594 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`!, |
| 4595 | memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle., dir_index); |
| 4596 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 0, 4.0); |
| 4597 | // AddGetToGoalCommonGoals(me); |
| 4598 | } |
| 4599 | |
| 4600 | void GuideBotcxx . . $ GuideBot#::DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(const char *str, bool f_high_priority, const char *sound_name, bool f_sound_2d) { |
| 4601 | if ((memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`!) && !f_high_priority) |
| 4602 | return; |
| 4603 | |
| 4604 | if (memorycxx . . $ GuideBot#memory.->last_sound_timecxx . . $ guidebot_data#last_sound_time. + 2.5f < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 4605 | if (sound_name) { |
| 4606 | int s_id = Sound_FindIdcxx . . $ Sound_FindId.(sound_name); |
| 4607 | if (f_sound_2d) |
| 4608 | Sound_Play2dcxx . . $ Sound_Play2d(1df3af30621f6c78).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., s_id); |
| 4609 | else |
| 4610 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., s_id); |
| 4611 | } |
| 4612 | |
| 4613 | memorycxx . . $ GuideBot#memory.->last_sound_timecxx . . $ guidebot_data#last_sound_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 4614 | } |
| 4615 | |
| 4616 | char gb_message[256]; |
| 4617 | snprintf(gb_message, sizeof(gb_message), "\1\255\255\1%s:\1\1\255\1 %s", memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name., str); |
| 4618 | Player_AddHudMessagecxx . . $ Player_AddHudMessage.(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., gb_message); |
| 4619 | } |
| 4620 | |
| 4621 | bool GuideBotcxx . . $ GuideBot#::SetSubModecxx . . $ GuideBot#SetSubMode(db021eaee9c3e7a9).(int me, char sub_mode, int it) { |
| 4622 | switch (sub_mode) { |
| 4623 | case GBSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1402:9`!: { |
| 4624 | if (memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. == GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!) { |
| 4625 | float dist = -10000.0f; |
| 4626 | // chrishack -- need a message! |
| 4627 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 2, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, it); |
| 4628 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 4629 | |
| 4630 | if (memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. != GBSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1402:9`!) { |
| 4631 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_I_FOUND_A_GB_POWERUPcxx . . $ `scripts/AIGame.cpp:202:9`!, true, "GBotExcited1"); |
| 4632 | } |
| 4633 | } |
| 4634 | } break; |
| 4635 | case GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!: { |
| 4636 | } break; |
| 4637 | } |
| 4638 | |
| 4639 | memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. = sub_mode; |
| 4640 | // mprintf(0, "Sub Mode is %d\n", memory->sub_mode); |
| 4641 | |
| 4642 | return true; |
| 4643 | } |
| 4644 | |
| 4645 | bool GuideBotcxx . . $ GuideBot#::SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(int me, char mode) { |
| 4646 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); // Gets rid of all goal BS |
| 4647 | memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. = 0.0f; |
| 4648 | |
| 4649 | memorycxx . . $ GuideBot#memory.->time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare. = 3.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 4650 | memorycxx . . $ GuideBot#memory.->time_till_next_pvis_checkcxx . . $ guidebot_data#time_till_next_pvis_check. = 0.5f + (0.5f * ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!)); |
| 4651 | memorycxx . . $ GuideBot#memory.->last_retreat_timecxx . . $ guidebot_data#last_retreat_time. = memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 4652 | |
| 4653 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_RTYPEcxx . . $ `scripts/AIGame.cpp:1392:9`!) { |
| 4654 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc.); |
| 4655 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed.); |
| 4656 | } |
| 4657 | |
| 4658 | if (memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 4659 | msafe_structcxx . . $ msafe_struct# mo; |
| 4660 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj.; |
| 4661 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 4662 | |
| 4663 | memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 4664 | } |
| 4665 | |
| 4666 | float dist = 4.0f; |
| 4667 | int g_index = |
| 4668 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 4669 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 4670 | |
| 4671 | int hack_flags = AIF_GB_MIMIC_PLAYER_FIRING_HACKcxx . . $ `Descent3/aistruct_external.h:351:9`!; |
| 4672 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &hack_flags); |
| 4673 | |
| 4674 | int wbflags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 4675 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 3, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &wbflags); |
| 4676 | |
| 4677 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`! && mode != GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`!) { |
| 4678 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4679 | |
| 4680 | if (memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_EXTINGUISHINGcxx . . $ `scripts/AIGame.cpp:1412:9`!) { |
| 4681 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= ~GBF_EXTINGUISHINGcxx . . $ `scripts/AIGame.cpp:1412:9`!; |
| 4682 | mstruct.idcxx . . $ msafe_struct#id. = memorycxx . . $ GuideBot#memory.->extinguish_spew_idcxx . . $ guidebot_data#extinguish_spew_id.; |
| 4683 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_STOP_SPEWcxx . . $ `scripts/osiris_common.h:816:9`!, &mstruct); |
| 4684 | } |
| 4685 | |
| 4686 | mstruct.idcxx . . $ msafe_struct#id. = memorycxx . . $ GuideBot#memory.->extinguish_spew_idcxx . . $ guidebot_data#extinguish_spew_id.; |
| 4687 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_STOP_SPEWcxx . . $ `scripts/osiris_common.h:816:9`!, &mstruct); |
| 4688 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 33.0f, 41.0f, 1.2f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 4689 | } |
| 4690 | |
| 4691 | switch (mode) { |
| 4692 | case GBM_IN_SHIPcxx . . $ `scripts/AIGame.cpp:1384:9`!: |
| 4693 | break; |
| 4694 | case GBM_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1396:9`!: { |
| 4695 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ENTERINGSHIPcxx . . $ `scripts/AIGame.cpp:101:9`!, true); |
| 4696 | } |
| 4697 | case GBM_RESPAWN_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1397:9`!: { |
| 4698 | int i; |
| 4699 | |
| 4700 | if (mode == GBM_RESPAWN_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1397:9`!) { |
| 4701 | float gb_shields = 250; |
| 4702 | int flags = OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!; |
| 4703 | |
| 4704 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 4705 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &gb_shields); |
| 4706 | |
| 4707 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4708 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4709 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 0.0f, 0.0f); |
| 4710 | } |
| 4711 | |
| 4712 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= ~GBF_WANTING_TO_ENTER_PDEADcxx . . $ `scripts/AIGame.cpp:1416:9`!; |
| 4713 | |
| 4714 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 0.0f, 0.0f); |
| 4715 | for (i = 0; i < NUM_GB_SOUNDScxx . . $ `scripts/AIGame.cpp:1502:9`!; i++) { |
| 4716 | if (memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[i] != -1) { |
| 4717 | Sound_Stopcxx . . $ Sound_Stop(918ebd27a9ddbad3).(memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[i], true); |
| 4718 | memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[i] = -1; |
| 4719 | } |
| 4720 | } |
| 4721 | |
| 4722 | msafe_structcxx . . $ msafe_struct# m; |
| 4723 | m.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.; |
| 4724 | m.typecxx . . $ msafe_struct#type. = OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!; |
| 4725 | m.idcxx . . $ msafe_struct#id. = ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!; |
| 4726 | m.flagscxx . . $ msafe_struct#flags. = 0; |
| 4727 | |
| 4728 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_INVEN_ADD_TYPE_IDcxx . . $ `scripts/osiris_common.h:896:9`!, &m); |
| 4729 | |
| 4730 | Obj_Ghostcxx . . $ Obj_Ghost.(me, true); |
| 4731 | mode = GBM_IN_SHIPcxx . . $ `scripts/AIGame.cpp:1384:9`!; |
| 4732 | } break; |
| 4733 | case GBM_BIRTHcxx . . $ `scripts/AIGame.cpp:1395:9`!: { |
| 4734 | int room; |
| 4735 | vectorcxx . . $ vector# pos; |
| 4736 | matrixcxx . . $ matrix# orient; |
| 4737 | vectorcxx . . $ vector# vel; |
| 4738 | int flags; |
| 4739 | |
| 4740 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4741 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4742 | |
| 4743 | memorycxx . . $ GuideBot#memory.->f_parentedcxx . . $ guidebot_data#f_parented. = true; |
| 4744 | memorycxx . . $ GuideBot#memory.->f_pickupcxx . . $ guidebot_data#f_pickup. = false; |
| 4745 | memorycxx . . $ GuideBot#memory.->last_animcxx . . $ guidebot_data#last_anim. = 0.0f; |
| 4746 | |
| 4747 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 6.0f, 12.0f, 1.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`! | AIAF_IMMEDIATEcxx . . $ `Descent3/aistruct_external.h:119:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 4748 | |
| 4749 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 4750 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 4751 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 4752 | |
| 4753 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 4754 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 4755 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 4756 | |
| 4757 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 4758 | |
| 4759 | vel +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 40.0f; |
| 4760 | |
| 4761 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 4762 | |
| 4763 | Obj_Ghostcxx . . $ Obj_Ghost.(me, false); |
| 4764 | |
| 4765 | msafe_structcxx . . $ msafe_struct# m; |
| 4766 | m.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.; |
| 4767 | m.typecxx . . $ msafe_struct#type. = OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!; |
| 4768 | m.idcxx . . $ msafe_struct#id. = ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`!; |
| 4769 | m.flagscxx . . $ msafe_struct#flags. = 0; |
| 4770 | |
| 4771 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_INVEN_REMOVEcxx . . $ `scripts/osiris_common.h:899:9`!, &m); |
| 4772 | |
| 4773 | float time = Game_GetTimecxx . . $ Game_GetTime.(); |
| 4774 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:639:9`!, &time); |
| 4775 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!, &memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 4776 | |
| 4777 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 1.2f; |
| 4778 | |
| 4779 | // AI_AddGoal(me, AIG_MOVE_RELATIVE_OBJ_VEC, 0, 1.0f, -1, GF_KEEP_AT_COMPLETION, memory->my_player, |
| 4780 | // GST_FVEC); AI_SetGoalCircleDist(me, 0, 40.0f); |
| 4781 | |
| 4782 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 200.0f; |
| 4783 | |
| 4784 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &pos, room); |
| 4785 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 1.0f); |
| 4786 | |
| 4787 | int s_id = Sound_FindIdcxx . . $ Sound_FindId.("GBExpulsionA"); |
| 4788 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., s_id); |
| 4789 | |
| 4790 | memorycxx . . $ GuideBot#memory.->last_commandcxx . . $ guidebot_data#last_command. = -1; |
| 4791 | } break; |
| 4792 | case GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!: { |
| 4793 | ReInitAmbientcxx . . $ GuideBot#ReInitAmbient(d4f767463ce0a6b3).(me); |
| 4794 | } break; |
| 4795 | case GBM_DOING_TASKcxx . . $ `scripts/AIGame.cpp:1386:9`!: |
| 4796 | memorycxx . . $ GuideBot#memory.->last_retreat_timecxx . . $ guidebot_data#last_retreat_time. = memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 4797 | break; |
| 4798 | case GBM_KIDNAPPEDcxx . . $ `scripts/AIGame.cpp:1387:9`!: |
| 4799 | break; |
| 4800 | case GBM_TALKINGcxx . . $ `scripts/AIGame.cpp:1388:9`!: |
| 4801 | break; |
| 4802 | case GBM_THIEFcxx . . $ `scripts/AIGame.cpp:1389:9`!: |
| 4803 | break; |
| 4804 | case GBM_ON_FIREcxx . . $ `scripts/AIGame.cpp:1390:9`!: { |
| 4805 | int flags; |
| 4806 | |
| 4807 | // In general, Turn on friend avoidance |
| 4808 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4809 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4810 | |
| 4811 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_HELPMSGcxx . . $ `scripts/AIGame.cpp:102:9`!, true, "GBotConcern1"); |
| 4812 | |
| 4813 | int s_index = Sound_FindIdcxx . . $ Sound_FindId.("GBotHurt1"); |
| 4814 | memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[GBS_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1503:9`!] = Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, s_index); |
| 4815 | |
| 4816 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 4817 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, -1.0f); |
| 4818 | |
| 4819 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 4820 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. = GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`!; |
| 4821 | |
| 4822 | memorycxx . . $ GuideBot#memory.->f_pickupcxx . . $ guidebot_data#f_pickup. = true; |
| 4823 | } break; |
| 4824 | case GBM_MANUALcxx . . $ `scripts/AIGame.cpp:1391:9`!: |
| 4825 | break; |
| 4826 | case GBM_RTYPEcxx . . $ `scripts/AIGame.cpp:1392:9`!: { |
| 4827 | // In general, Turn on friend avoidance |
| 4828 | int flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4829 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4830 | |
| 4831 | float acc = memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc. * 4.0f; |
| 4832 | float speed = memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed. * 1.6f; |
| 4833 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 4834 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 4835 | |
| 4836 | int room; |
| 4837 | vectorcxx . . $ vector# pos; |
| 4838 | matrixcxx . . $ matrix# orient; |
| 4839 | |
| 4840 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 4841 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 4842 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 4843 | |
| 4844 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 3.0f; |
| 4845 | pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.uveccxx . . $ matrix#uvec. *cxx . . $ `operator*`(252247219a31502c). 10.0f; |
| 4846 | |
| 4847 | memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("Invisiblepowerup"), room, &pos, &orient, me); |
| 4848 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 4849 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj.; |
| 4850 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!, &mstruct); |
| 4851 | |
| 4852 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 3, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`!, |
| 4853 | memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj., GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!); |
| 4854 | // AI_SetGoalCircleDist(me, 3, 4.0f); |
| 4855 | |
| 4856 | int hack_flags = AIF_GB_MIMIC_PLAYER_FIRING_HACKcxx . . $ `Descent3/aistruct_external.h:351:9`!; |
| 4857 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &hack_flags); |
| 4858 | } break; |
| 4859 | case GBM_GO_WINGNUTcxx . . $ `scripts/AIGame.cpp:1393:9`!: { |
| 4860 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 4861 | int flags = GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!; |
| 4862 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!, &flags); |
| 4863 | |
| 4864 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 1.0f; |
| 4865 | |
| 4866 | // In general, Turn on friend avoidance |
| 4867 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 4868 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 4869 | |
| 4870 | int dir_index = randcxx . . $ rand(9efc7249d839d30e).() % 6; |
| 4871 | float interval = 2.0f; |
| 4872 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 3, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., dir_index); |
| 4873 | AI_GoalAddEnablercxx . . $ AI_GoalAddEnabler.(me, 3, AIE_GT_LAST_SEE_TARGET_INTERVALcxx . . $ `Descent3/aistruct_external.h:160:9`!, 1.0f, 0.0f, &interval); |
| 4874 | |
| 4875 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 3, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &wbflags); |
| 4876 | } break; |
| 4877 | case GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`!: |
| 4878 | |
| 4879 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_ORIENT_GOAL_OBJcxx . . $ `Descent3/aistruct_external.h:235:9`!, |
| 4880 | memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[0], 0); |
| 4881 | |
| 4882 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 0, 20.0f); |
| 4883 | memorycxx . . $ GuideBot#memory.->extinguish_obj_timecxx . . $ guidebot_data#extinguish_obj_time. = 0.0f; |
| 4884 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 2.0f; |
| 4885 | break; |
| 4886 | } |
| 4887 | |
| 4888 | memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. = mode; |
| 4889 | memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. = GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!; |
| 4890 | |
| 4891 | // mprintf(0, "Mode is %d\n", memory->mode); |
| 4892 | |
| 4893 | return true; |
| 4894 | } |
| 4895 | |
| 4896 | bool GuideBotcxx . . $ GuideBot#::InitExtinguishcxx . . $ GuideBot#InitExtinguish(efaadfb7dc14930a).(bool f_player_on_fire) { |
| 4897 | vectorcxx . . $ vector# pos; |
| 4898 | int room; |
| 4899 | int scan_objs[25]; |
| 4900 | int n_scan; |
| 4901 | int i; |
| 4902 | |
| 4903 | memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs. = 0; |
| 4904 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 4905 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 4906 | |
| 4907 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 1000.0f, scan_objs, 25, false, false, false, true); |
| 4908 | |
| 4909 | if (f_player_on_fire) { |
| 4910 | memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs.++] = memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.; |
| 4911 | } |
| 4912 | |
| 4913 | // mprintf(0, "Scanned %d objects\n", n_scan); |
| 4914 | for (i = 0; i < n_scan; i++) { |
| 4915 | if (memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs. >= 5) |
| 4916 | break; |
| 4917 | |
| 4918 | if (f_player_on_fire && scan_objs[i] == memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.) |
| 4919 | break; |
| 4920 | |
| 4921 | if (Obj_IsEffectcxx . . $ Obj_IsEffect.(scan_objs[i], EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!)) { |
| 4922 | // mprintf(0, "its on fire\n"); |
| 4923 | if (scan_objs[i] != memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me.) { |
| 4924 | if (!AI_IsObjEnemycxx . . $ AI_IsObjEnemy.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., scan_objs[i])) { |
| 4925 | // mprintf(0, "its not a enemy\n"); |
| 4926 | memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs.++] = scan_objs[i]; |
| 4927 | } |
| 4928 | } |
| 4929 | } |
| 4930 | } |
| 4931 | |
| 4932 | if (memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs.) { |
| 4933 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`!); |
| 4934 | return true; |
| 4935 | } else { |
| 4936 | return false; |
| 4937 | } |
| 4938 | } |
| 4939 | |
| 4940 | int GuideBotcxx . . $ GuideBot#::MakeCommandListcxx . . $ GuideBot#MakeCommandList(a5f7824ee4986326).(int *gbc_list) { |
| 4941 | int count = 0; |
| 4942 | int i; |
| 4943 | |
| 4944 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_IN_SHIPcxx . . $ `scripts/AIGame.cpp:1384:9`!) { |
| 4945 | for (i = 0; i <= GBC_RENAMEcxx . . $ `scripts/AIGame.cpp:1423:9`!; i++) { |
| 4946 | if (!(memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`!) && i == GBC_REPAIR_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:1422:9`!) |
| 4947 | continue; |
| 4948 | |
| 4949 | if ((memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`!) && i == GBC_EXIT_SHIPcxx . . $ `scripts/AIGame.cpp:1421:9`!) |
| 4950 | continue; |
| 4951 | |
| 4952 | gbc_list[count++] = i; |
| 4953 | } |
| 4954 | } else if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!) { |
| 4955 | int roomnum; |
| 4956 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &roomnum); |
| 4957 | |
| 4958 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGV_I_NUM_ACTIVE_PRIMARIEScxx . . $ `scripts/osiris_common.h:712:9`!, &memorycxx . . $ GuideBot#memory.->num_pgcxx . . $ guidebot_data#num_pg.); |
| 4959 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGV_I_NUM_ACTIVE_SECONDARIEScxx . . $ `scripts/osiris_common.h:715:9`!, &memorycxx . . $ GuideBot#memory.->num_sgcxx . . $ guidebot_data#num_sg.); |
| 4960 | |
| 4961 | for (i = GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`!; i < NUM_GB_COMMANDScxx . . $ `scripts/AIGame.cpp:1418:9`!; i++) { |
| 4962 | if (i >= GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! && i <= GBC_FIND_ACTIVE_GOAL_7cxx . . $ `scripts/AIGame.cpp:1431:9`!) { |
| 4963 | if (!(i - GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! < memorycxx . . $ GuideBot#memory.->num_pgcxx . . $ guidebot_data#num_pg.)) |
| 4964 | continue; |
| 4965 | } else if (i >= GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`! && i <= GBC_FIND_ACTIVE_SEC_GOAL_7cxx . . $ `scripts/AIGame.cpp:1439:9`!) { |
| 4966 | if (!(i - GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`! < memorycxx . . $ GuideBot#memory.->num_sgcxx . . $ guidebot_data#num_sg.)) |
| 4967 | continue; |
| 4968 | } else if (i >= GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`! && i <= GBC_FIND_MARKER_7cxx . . $ `scripts/AIGame.cpp:1455:9`!) { |
| 4969 | if (Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, i - GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`!, false, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1, |
| 4970 | &memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.) == 0) |
| 4971 | continue; |
| 4972 | } else if (i == GBC_FIND_SPEWcxx . . $ `scripts/AIGame.cpp:1440:9`!) { |
| 4973 | int handle; |
| 4974 | if (Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, -1, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., 1, &handle) == 0) |
| 4975 | continue; |
| 4976 | } else if (i == GBC_FIND_POWERUPcxx . . $ `scripts/AIGame.cpp:1441:9`!) { |
| 4977 | int handle; |
| 4978 | if (Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, -1, false, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1, &handle) == 0) |
| 4979 | continue; |
| 4980 | } else if (i == GBC_FIND_ROBOTcxx . . $ `scripts/AIGame.cpp:1443:9`!) { |
| 4981 | int handle; |
| 4982 | if (Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, -1, false, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1, &handle) == 0) |
| 4983 | continue; |
| 4984 | } else if (i == GBC_FIND_THIEFcxx . . $ `scripts/AIGame.cpp:1444:9`!) { |
| 4985 | int id = Obj_FindIDcxx . . $ Obj_FindID.("Thief"); |
| 4986 | int handle; |
| 4987 | |
| 4988 | if (id < 0 || Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, id, false, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1, &handle) == 0) |
| 4989 | continue; |
| 4990 | } else if (i == GBC_FIND_CLOSEST_MARKERcxx . . $ `scripts/AIGame.cpp:1447:9`!) { |
| 4991 | int handle; |
| 4992 | if (Obj_MakeListOfTypecxx . . $ Obj_MakeListOfType.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, -1, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., 1, &handle) == 0) |
| 4993 | continue; |
| 4994 | } else if (i >= GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`! && i < GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`! + NUM_GB_USABLE_POWERUPScxx . . $ `scripts/AIGame.cpp:1480:9`!) { |
| 4995 | if (memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[i - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!] <= 0) |
| 4996 | continue; |
| 4997 | } else if (i == GBC_FIND_OUTSIDEcxx . . $ `scripts/AIGame.cpp:1445:9`! /*&& (0x80000000 & roomnum)*/) |
| 4998 | continue; |
| 4999 | else if (i == GBC_FIND_MINEcxx . . $ `scripts/AIGame.cpp:1446:9`! /*&& !(0x80000000 & roomnum)*/) |
| 5000 | continue; |
| 5001 | else if (i == GBC_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1463:9`! && (memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`!)) |
| 5002 | continue; |
| 5003 | else if (i == GBC_ALLOW_CHATTERcxx . . $ `scripts/AIGame.cpp:1462:9`! && !(memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`!)) |
| 5004 | continue; |
| 5005 | |
| 5006 | gbc_list[count++] = i; |
| 5007 | } |
| 5008 | } |
| 5009 | |
| 5010 | return count; |
| 5011 | } |
| 5012 | |
| 5013 | void GuideBotcxx . . $ GuideBot#::AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(int me) { |
| 5014 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 2, 1.0f, -1, GF_ORIENT_GOAL_OBJcxx . . $ `Descent3/aistruct_external.h:235:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!); |
| 5015 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 3, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5016 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 3, 20.0f); |
| 5017 | } |
| 5018 | |
| 5019 | bool GuideBotcxx . . $ GuideBot#::DoExternalCommandscxx . . $ GuideBot#DoExternalCommands(70121a6dc333946f).(int me, gb_comcxx . . $ gb_com# *command, int it) { |
| 5020 | int g_robot; |
| 5021 | int roomnum; |
| 5022 | vectorcxx . . $ vector# pos; |
| 5023 | int flags; |
| 5024 | |
| 5025 | mprintfcxx . . $ mprintf.(0, "Command %d for GB\n", command->actioncxx . . $ gb_com#action.); |
| 5026 | |
| 5027 | // In general, Turn on friend avoidance |
| 5028 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 5029 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 5030 | |
| 5031 | if (command->actioncxx . . $ gb_com#action. == COM_REINITcxx . . $ `scripts/osiris_common.h:956:9`!) { |
| 5032 | return DoInitcxx . . $ GuideBot#DoInit(9609253e83e89946).(me, true); |
| 5033 | } else if (command->actioncxx . . $ gb_com#action. == COM_DO_ACTIONcxx . . $ `scripts/osiris_common.h:955:9`!) { |
| 5034 | int param1 = command->indexcxx . . $ gb_com#index.; |
| 5035 | // mprintf(0, "P is %d\n", param1); |
| 5036 | |
| 5037 | memorycxx . . $ GuideBot#memory.->last_commandcxx . . $ guidebot_data#last_command. = param1; |
| 5038 | |
| 5039 | if ((param1 >= GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! && param1 <= GBC_FIND_ACTIVE_GOAL_7cxx . . $ `scripts/AIGame.cpp:1431:9`!) || |
| 5040 | (param1 >= GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`! && param1 <= GBC_FIND_ACTIVE_SEC_GOAL_7cxx . . $ `scripts/AIGame.cpp:1439:9`!)) { |
| 5041 | int g_id; |
| 5042 | int flags; |
| 5043 | char type; |
| 5044 | int rhandle[32]; |
| 5045 | bool rdone[32]; |
| 5046 | int handle[32]; |
| 5047 | bool done[32]; |
| 5048 | int i; |
| 5049 | int rnum_items; |
| 5050 | int num_items; |
| 5051 | |
| 5052 | if (param1 >= GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! && param1 <= GBC_FIND_ACTIVE_GOAL_7cxx . . $ `scripts/AIGame.cpp:1431:9`!) |
| 5053 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_ACTIVE_PRIMARY_GOALcxx . . $ `scripts/osiris_common.h:713:9`!, &g_id, param1 - GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`!); |
| 5054 | else |
| 5055 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_ACTIVE_SECONDARY_GOALcxx . . $ `scripts/osiris_common.h:716:9`!, &g_id, param1 - GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`!); |
| 5056 | |
| 5057 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_STATUScxx . . $ `scripts/osiris_common.h:725:9`!, &flags, g_id); |
| 5058 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSSV_C_ITEM_TYPEcxx . . $ `scripts/osiris_common.h:728:9`!, &type, g_id, 0); |
| 5059 | |
| 5060 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_NUM_ITEMScxx . . $ `scripts/osiris_common.h:727:9`!, &rnum_items, g_id); |
| 5061 | |
| 5062 | for (i = 0; i < rnum_items; i++) { |
| 5063 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSSV_I_ITEM_HANDLEcxx . . $ `scripts/osiris_common.h:729:9`!, &rhandle[i], g_id, i); |
| 5064 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSSV_B_ITEM_DONEcxx . . $ `scripts/osiris_common.h:730:9`!, &rdone[i], g_id, i); |
| 5065 | } |
| 5066 | |
| 5067 | num_items = 0; |
| 5068 | for (i = 0; i < rnum_items; i++) { |
| 5069 | if (!rdone[i]) { |
| 5070 | handle[num_items++] = rhandle[i]; |
| 5071 | } |
| 5072 | } |
| 5073 | |
| 5074 | if (num_items == 0) { |
| 5075 | num_items = 1; |
| 5076 | handle[0] = rhandle[0]; |
| 5077 | } |
| 5078 | |
| 5079 | if (flags & LGF_NOT_LOC_BASEDcxx . . $ `Descent3/levelgoal_external.h:44:9`!) { |
| 5080 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTLOCATIONcxx . . $ `scripts/AIGame.cpp:103:9`!, true, "GBotConcern1"); |
| 5081 | } else if (flags & LGF_GB_DOESNT_KNOW_LOCcxx . . $ `Descent3/levelgoal_external.h:43:9`!) { |
| 5082 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NONAVcxx . . $ `scripts/AIGame.cpp:104:9`!, true, "GBotConcern1"); |
| 5083 | } else if (type == LIT_OBJECTcxx . . $ `Descent3/levelgoal_external.h:28:9`!) { |
| 5084 | bool f_ok = false; |
| 5085 | |
| 5086 | for (i = 0; i < num_items; i++) // chrishack - do distance check (should be trial) |
| 5087 | { |
| 5088 | int type; |
| 5089 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 5090 | |
| 5091 | if (type != OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`! && AI_IsObjReachablecxx . . $ AI_IsObjReachable.(me, handle[i])) { |
| 5092 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ONMYWAYcxx . . $ `scripts/AIGame.cpp:105:9`!, false, "GBotAcceptOrder1"); |
| 5093 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, handle[i]); |
| 5094 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 20.0f); |
| 5095 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5096 | f_ok = true; |
| 5097 | break; |
| 5098 | } |
| 5099 | } |
| 5100 | |
| 5101 | if (!f_ok) { |
| 5102 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTREACHcxx . . $ `scripts/AIGame.cpp:106:9`!, true, "GBotConcern1"); |
| 5103 | } |
| 5104 | } else if (type == LIT_INTERNAL_ROOMcxx . . $ `Descent3/levelgoal_external.h:27:9`!) { |
| 5105 | if (AI_IsDestReachablecxx . . $ AI_IsDestReachable.(me, handle[0])) { |
| 5106 | vectorcxx . . $ vector# pnt; |
| 5107 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(handle[0], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMSV_V_PORTAL_PATH_PNTcxx . . $ `scripts/osiris_common.h:698:9`!, &pnt); |
| 5108 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &pnt, handle[0]); |
| 5109 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 20.0f); |
| 5110 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5111 | |
| 5112 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ONMYWAYcxx . . $ `scripts/AIGame.cpp:105:9`!, false, "GBotAcceptOrder1"); |
| 5113 | } else { |
| 5114 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTREACHcxx . . $ `scripts/AIGame.cpp:106:9`!, true, "GBotConcern1"); |
| 5115 | } |
| 5116 | } else if (type == LIT_TRIGGERcxx . . $ `Descent3/levelgoal_external.h:29:9`!) { |
| 5117 | |
| 5118 | int room = Scrpt_GetTriggerRoomcxx . . $ Scrpt_GetTriggerRoom.(handle[0]); |
| 5119 | int face = Scrpt_GetTriggerFacecxx . . $ Scrpt_GetTriggerFace.(handle[0]); |
| 5120 | |
| 5121 | if (AI_IsDestReachablecxx . . $ AI_IsDestReachable.(me, room)) { |
| 5122 | vectorcxx . . $ vector# pnt; |
| 5123 | vectorcxx . . $ vector# normal; |
| 5124 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(room, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMSV_V_FACE_CENTER_PNTcxx . . $ `scripts/osiris_common.h:695:9`!, &pnt, face); |
| 5125 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(room, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMSV_V_FACE_NORMALcxx . . $ `scripts/osiris_common.h:694:9`!, &normal, face); |
| 5126 | |
| 5127 | pnt +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). (normal *cxx . . $ `operator*`(252247219a31502c). 5.0f); |
| 5128 | |
| 5129 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &pnt, room); |
| 5130 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 20.0f); |
| 5131 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5132 | |
| 5133 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ONMYWAYcxx . . $ `scripts/AIGame.cpp:105:9`!, false, "GBotAcceptOrder1"); |
| 5134 | } else { |
| 5135 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTREACHcxx . . $ `scripts/AIGame.cpp:106:9`!, true, "GBotConcern1"); |
| 5136 | } |
| 5137 | } |
| 5138 | } else if (param1 == GBC_RETURN_TO_SHIPcxx . . $ `scripts/AIGame.cpp:1464:9`!) { |
| 5139 | int flags; |
| 5140 | |
| 5141 | // Turn off friend avoidance |
| 5142 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 5143 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 5144 | |
| 5145 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ENTERSHIPcxx . . $ `scripts/AIGame.cpp:107:9`!, false, "GBotAcceptOrder1"); |
| 5146 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5147 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, -10.0f); |
| 5148 | memorycxx . . $ GuideBot#memory.->f_pickupcxx . . $ guidebot_data#f_pickup. = true; |
| 5149 | } else if (param1 == GBC_ESCORT_SHIPcxx . . $ `scripts/AIGame.cpp:1456:9`!) { |
| 5150 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_ESCORTcxx . . $ `scripts/AIGame.cpp:108:9`!, false, "GBotAcceptOrder1"); |
| 5151 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 5152 | } else if (param1 == GBC_FIND_ROBOTcxx . . $ `scripts/AIGame.cpp:1443:9`!) { |
| 5153 | |
| 5154 | g_robot = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, -1, false); |
| 5155 | |
| 5156 | if (g_robot != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5157 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FINDROBOTcxx . . $ `scripts/AIGame.cpp:109:9`!, false, "GBotAcceptOrder1"); |
| 5158 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, g_robot); |
| 5159 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 30.0f); |
| 5160 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5161 | } else { |
| 5162 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOROBOTcxx . . $ `scripts/AIGame.cpp:110:9`!, true, "GBotConcern1"); |
| 5163 | } |
| 5164 | } else if (param1 == GBC_FIND_POWERUPcxx . . $ `scripts/AIGame.cpp:1441:9`!) { |
| 5165 | |
| 5166 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, -1, false); |
| 5167 | |
| 5168 | if (memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5169 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FINDPOWERUPcxx . . $ `scripts/AIGame.cpp:111:9`!, false, "GBotAcceptOrder1"); |
| 5170 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.); |
| 5171 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 3.0f); |
| 5172 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5173 | } else { |
| 5174 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOPOWERUPcxx . . $ `scripts/AIGame.cpp:112:9`!, true, "GBotConcern1"); |
| 5175 | } |
| 5176 | } else if (param1 == GBC_FIND_CLOSEST_MARKERcxx . . $ `scripts/AIGame.cpp:1447:9`!) { |
| 5177 | |
| 5178 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, -1, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5179 | |
| 5180 | if (memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5181 | char message[256]; |
| 5182 | char marker_message[256]; |
| 5183 | |
| 5184 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_PC_MARKER_MESSAGEcxx . . $ `scripts/osiris_common.h:645:9`!, marker_message); |
| 5185 | |
| 5186 | if (strlen(marker_message) > 20) { |
| 5187 | marker_message[17] = '\0'; |
| 5188 | |
| 5189 | while (strlen(marker_message) > 0 && marker_message[strlen(marker_message) - 1] == ' ') { |
| 5190 | marker_message[strlen(marker_message) - 1] = '\0'; |
| 5191 | } |
| 5192 | |
| 5193 | strcat(marker_message, "..."); |
| 5194 | } |
| 5195 | |
| 5196 | snprintf(message, sizeof(message), TXT_GB_GOMARKERcxx . . $ `scripts/AIGame.cpp:113:9`!, marker_message); |
| 5197 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(message, false, "GBotAcceptOrder1"); |
| 5198 | |
| 5199 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.); |
| 5200 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 3.0f); |
| 5201 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5202 | } else { |
| 5203 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOMARKERcxx . . $ `scripts/AIGame.cpp:114:9`!, true, "GBotConcern1"); |
| 5204 | } |
| 5205 | } else if (param1 >= GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`! && param1 <= GBC_FIND_MARKER_7cxx . . $ `scripts/AIGame.cpp:1455:9`!) { |
| 5206 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, param1 - GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`!, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5207 | |
| 5208 | if (memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5209 | char message[256]; |
| 5210 | char marker_message[256]; |
| 5211 | |
| 5212 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_PC_MARKER_MESSAGEcxx . . $ `scripts/osiris_common.h:645:9`!, marker_message); |
| 5213 | |
| 5214 | if (/*strlen(marker_message) > 20*/ 0) { |
| 5215 | marker_message[17] = '\0'; |
| 5216 | |
| 5217 | while (strlen(marker_message) > 0 && marker_message[strlen(marker_message) - 1] == ' ') { |
| 5218 | marker_message[strlen(marker_message) - 1] = '\0'; |
| 5219 | } |
| 5220 | |
| 5221 | strcat(marker_message, "..."); |
| 5222 | } |
| 5223 | |
| 5224 | snprintf(message, sizeof(message), TXT_GB_GOMARKERcxx . . $ `scripts/AIGame.cpp:113:9`!, marker_message); |
| 5225 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(message, false, "GBotAcceptOrder1"); |
| 5226 | |
| 5227 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.); |
| 5228 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 3.0f); |
| 5229 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5230 | } else { |
| 5231 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOMARKcxx . . $ `scripts/AIGame.cpp:115:9`!, true, "GBotConcern1"); |
| 5232 | } |
| 5233 | } else if (param1 == GBC_FIND_THIEFcxx . . $ `scripts/AIGame.cpp:1444:9`!) { |
| 5234 | int id = Obj_FindIDcxx . . $ Obj_FindID.("Thief"); |
| 5235 | |
| 5236 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, id, false); |
| 5237 | |
| 5238 | if (memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5239 | if (randcxx . . $ rand(9efc7249d839d30e).() > RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! / 2) |
| 5240 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FINDTHIEFcxx . . $ `scripts/AIGame.cpp:116:9`!, false, "GBotAcceptOrder1"); |
| 5241 | else |
| 5242 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FOUNDTHIEFcxx . . $ `scripts/AIGame.cpp:117:9`!, false, "GBotAcceptOrder1"); |
| 5243 | |
| 5244 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.); |
| 5245 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 3.0f); |
| 5246 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5247 | } else { |
| 5248 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTHIEFcxx . . $ `scripts/AIGame.cpp:118:9`!, true, "GBotConcern1"); |
| 5249 | } |
| 5250 | } else if (param1 == GBC_FIND_SPEWcxx . . $ `scripts/AIGame.cpp:1440:9`!) { |
| 5251 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, -1, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5252 | |
| 5253 | if (memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5254 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FINDPOWERUPScxx . . $ `scripts/AIGame.cpp:119:9`!, false, "GBotAcceptOrder1"); |
| 5255 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup.); |
| 5256 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 3.0f); |
| 5257 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5258 | } else { |
| 5259 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOMESSAGEcxx . . $ `scripts/AIGame.cpp:120:9`!, true, "GBotConcern1"); |
| 5260 | } |
| 5261 | } else if (param1 == GBC_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1463:9`!) { |
| 5262 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. |= GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`!; |
| 5263 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_CHATOFFcxx . . $ `scripts/AIGame.cpp:121:9`!, true, "GBotConcern1"); |
| 5264 | } else if (param1 == GBC_ALLOW_CHATTERcxx . . $ `scripts/AIGame.cpp:1462:9`!) { |
| 5265 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= (~GBF_NO_CHATTERcxx . . $ `scripts/AIGame.cpp:1409:9`!); |
| 5266 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_CHATONcxx . . $ `scripts/AIGame.cpp:122:9`!, false, "GBotAcceptOrder1"); |
| 5267 | } else if (param1 == GBC_FIND_ENERGY_CENTERcxx . . $ `scripts/AIGame.cpp:1442:9`!) { |
| 5268 | roomnum = AI_FindEnergyCentercxx . . $ AI_FindEnergyCenter.(me); |
| 5269 | char f_used; |
| 5270 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(roomnum, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMV_C_USEDcxx . . $ `scripts/osiris_common.h:686:9`!, &f_used); |
| 5271 | |
| 5272 | if (f_used != 0) { |
| 5273 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(roomnum, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMSV_V_PATH_PNTcxx . . $ `scripts/osiris_common.h:689:9`!, &pos, 1); |
| 5274 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &pos, roomnum); |
| 5275 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 20.0f); |
| 5276 | AddGetToGoalCommonGoalscxx . . $ GuideBot#AddGetToGoalCommonGoals(d4f767463ce0a6b3).(me); |
| 5277 | |
| 5278 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FINDENERGYcxx . . $ `scripts/AIGame.cpp:123:9`!, false, "GBotAcceptOrder1"); |
| 5279 | } else { |
| 5280 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOENERGYcxx . . $ `scripts/AIGame.cpp:124:9`!, true, "GBotConcern1"); |
| 5281 | } |
| 5282 | } else if (param1 == GBC_REPAIR_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:1422:9`!) { |
| 5283 | float shields; |
| 5284 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 5285 | |
| 5286 | if (shields >= 5 + 5 * Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.()) { |
| 5287 | shields -= 5 + 5 * Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 5288 | |
| 5289 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= (~GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`!); |
| 5290 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 5291 | |
| 5292 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_REPAIREDcxx . . $ `scripts/AIGame.cpp:125:9`!, false, "GBotAcceptOrder1", true); |
| 5293 | |
| 5294 | float gb_shields = 250; |
| 5295 | int flags = OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!; |
| 5296 | |
| 5297 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 5298 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &gb_shields); |
| 5299 | |
| 5300 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 5301 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 5302 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 0.0f, 0.0f); |
| 5303 | } else { |
| 5304 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_NOTENSHcxx . . $ `scripts/AIGame.cpp:126:9`!, true, "GBotConcern1", true); |
| 5305 | } |
| 5306 | } else if (param1 == GBC_EXIT_SHIPcxx . . $ `scripts/AIGame.cpp:1421:9`!) { |
| 5307 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 5308 | Obj_CallEventcxx . . $ Obj_CallEvent.(me, EVT_USEcxx . . $ `scripts/osiris_common.h:370:9`!, &ei); |
| 5309 | } else if (param1 >= GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`! && param1 < GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`! + NUM_GB_USABLE_POWERUPScxx . . $ `scripts/AIGame.cpp:1480:9`!) { |
| 5310 | char pow_message[50]; |
| 5311 | bool f_do = true; |
| 5312 | |
| 5313 | if (memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[param1 - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!] > 0) { |
| 5314 | switch (param1 - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!) { |
| 5315 | case GB_POW_FIREcxx . . $ `scripts/AIGame.cpp:1495:9`!: { |
| 5316 | int room; |
| 5317 | float damage = 0.0f; |
| 5318 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 5319 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(room, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMV_F_DAMAGEcxx . . $ `scripts/osiris_common.h:704:9`!, &damage); |
| 5320 | if (damage == 0.0f) { |
| 5321 | f_do = InitExtinguishcxx . . $ GuideBot#InitExtinguish(efaadfb7dc14930a).(false); |
| 5322 | } else { |
| 5323 | int s_id = Sound_FindIdcxx . . $ Sound_FindId.("GBotConcern1"); |
| 5324 | Sound_Play2dcxx . . $ Sound_Play2d(1df3af30621f6c78).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., s_id); |
| 5325 | |
| 5326 | return true; |
| 5327 | } |
| 5328 | } break; |
| 5329 | |
| 5330 | case GB_POW_ANTIVIRUScxx . . $ `scripts/AIGame.cpp:1499:9`!: { |
| 5331 | vectorcxx . . $ vector# pos; |
| 5332 | int room; |
| 5333 | int n_scan; |
| 5334 | int scan_objs[25]; |
| 5335 | int n_converted = 0; |
| 5336 | int i; |
| 5337 | |
| 5338 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 5339 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 5340 | |
| 5341 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 500.0f, scan_objs, 25, false, false, false, true); |
| 5342 | |
| 5343 | for (i = 0; i < n_scan; i++) { |
| 5344 | if (n_converted > 2) |
| 5345 | break; |
| 5346 | |
| 5347 | if (memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots. >= MAX_AV_ROBOTScxx . . $ `scripts/AIGame.cpp:1484:9`!) |
| 5348 | break; |
| 5349 | |
| 5350 | if (scan_objs[i] != memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me.) { |
| 5351 | if (AI_IsObjEnemycxx . . $ AI_IsObjEnemy.(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., scan_objs[i])) { |
| 5352 | ray_infocxx . . $ ray_info# ray; |
| 5353 | int flags; |
| 5354 | int fate; |
| 5355 | vectorcxx . . $ vector# end_pos; |
| 5356 | |
| 5357 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &end_pos); |
| 5358 | |
| 5359 | flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 5360 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 5361 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &pos, &end_pos, room, 1.0f, flags, &ray); |
| 5362 | |
| 5363 | if (fate == HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 5364 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 5365 | int type; |
| 5366 | |
| 5367 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &mstruct.roomnumcxx . . $ msafe_struct#roomnum.); |
| 5368 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.poscxx . . $ msafe_struct#pos.); |
| 5369 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.pos2cxx . . $ msafe_struct#pos2.); |
| 5370 | |
| 5371 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me.; |
| 5372 | mstruct.ithandlecxx . . $ msafe_struct#ithandle. = scan_objs[i]; |
| 5373 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 3.5f; |
| 5374 | mstruct.sizecxx . . $ msafe_struct#size. = 3.0f; |
| 5375 | |
| 5376 | mstruct.intervalcxx . . $ msafe_struct#interval. = 0.2f; |
| 5377 | mstruct.countcxx . . $ msafe_struct#count. = 2; |
| 5378 | mstruct.indexcxx . . $ msafe_struct#index. = 4; |
| 5379 | mstruct.texnumcxx . . $ msafe_struct#texnum. = Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("FunkyEffectAntiV"); |
| 5380 | mstruct.colorcxx . . $ msafe_struct#color. = ((128 >> 3) << 10) | ((128 >> 3) << 5) | (128 >> 3); |
| 5381 | |
| 5382 | mstruct.statecxx . . $ msafe_struct#state. = 0; |
| 5383 | mstruct.flagscxx . . $ msafe_struct#flags. = 0; |
| 5384 | |
| 5385 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_WEATHER_LIGHTNING_BOLTcxx . . $ `scripts/osiris_common.h:863:9`!, &mstruct); |
| 5386 | |
| 5387 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &mstruct.roomnumcxx . . $ msafe_struct#roomnum.); |
| 5388 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.poscxx . . $ msafe_struct#pos.); |
| 5389 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.pos2cxx . . $ msafe_struct#pos2.); |
| 5390 | |
| 5391 | int flags = AIF_TEAM_MASKcxx . . $ `Descent3/aistruct_external.h:364:9`!; |
| 5392 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 5393 | flags = AIF_TEAM_REBELcxx . . $ `Descent3/aistruct_external.h:366:9`!; |
| 5394 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 5395 | |
| 5396 | int target_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 5397 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 5398 | |
| 5399 | memorycxx . . $ GuideBot#memory.->av_revert_timecxx . . $ guidebot_data#av_revert_time.[memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots.] = Game_GetTimecxx . . $ Game_GetTime.() + 30.0f; |
| 5400 | memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots.++] = scan_objs[i]; |
| 5401 | |
| 5402 | n_converted++; |
| 5403 | } |
| 5404 | } |
| 5405 | } |
| 5406 | } |
| 5407 | |
| 5408 | f_do = (n_converted > 0); |
| 5409 | } break; |
| 5410 | |
| 5411 | case GB_POW_WINGNUTcxx . . $ `scripts/AIGame.cpp:1496:9`!: { |
| 5412 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_GO_WINGNUTcxx . . $ `scripts/AIGame.cpp:1393:9`!); |
| 5413 | f_do = true; |
| 5414 | } break; |
| 5415 | |
| 5416 | case GB_POW_RTYPEcxx . . $ `scripts/AIGame.cpp:1498:9`!: { |
| 5417 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_RTYPEcxx . . $ `scripts/AIGame.cpp:1392:9`!); |
| 5418 | f_do = true; |
| 5419 | } break; |
| 5420 | |
| 5421 | case GB_POW_SPEEDcxx . . $ `scripts/AIGame.cpp:1500:9`!: { |
| 5422 | float speed; |
| 5423 | float acc; |
| 5424 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 5425 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 5426 | |
| 5427 | if (acc == memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc. && speed == memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed.) { |
| 5428 | speed *= 3.0f; |
| 5429 | acc *= 6.0f; |
| 5430 | |
| 5431 | memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. = 30.0f; |
| 5432 | |
| 5433 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 5434 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 5435 | |
| 5436 | f_do = true; |
| 5437 | } else { |
| 5438 | f_do = false; |
| 5439 | } |
| 5440 | |
| 5441 | } break; |
| 5442 | } |
| 5443 | |
| 5444 | if (f_do) { |
| 5445 | snprintf(pow_message, sizeof(pow_message), "%s", TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(gb_pow_text[param1 - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!])); |
| 5446 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(pow_message, false, "GBotAcceptOrder1"); |
| 5447 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[param1 - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!]--; |
| 5448 | } else { |
| 5449 | snprintf(pow_message, sizeof(pow_message), "%s", TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(gb_pow_not_text[param1 - GB_POW_STRING_OFFSETcxx . . $ `scripts/AIGame.cpp:1482:9`!])); |
| 5450 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(pow_message, false, "GBotConcern1"); |
| 5451 | } |
| 5452 | } else { |
| 5453 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_DONT_HAVE_POWERUPcxx . . $ `scripts/AIGame.cpp:201:9`!, false, "GBotConcern1"); |
| 5454 | } |
| 5455 | } else if (param1 == GBC_RENAMEcxx . . $ `scripts/AIGame.cpp:1423:9`!) { |
| 5456 | char str[80]; |
| 5457 | if (strlen((char *)command->ptrcxx . . $ gb_com#ptr.) > 0) { |
| 5458 | strncpy(memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name., (char *)command->ptrcxx . . $ gb_com#ptr., 7); |
| 5459 | memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name.[7] = '\0'; |
| 5460 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, PLYV_CS_GUIDEBOTNAMEcxx . . $ `scripts/osiris_common.h:475:9`!, memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name.); |
| 5461 | |
| 5462 | snprintf(str, sizeof(str), TXT_GB_NEWNAMEcxx . . $ `scripts/AIGame.cpp:127:9`!, (char *)command->ptrcxx . . $ gb_com#ptr.); |
| 5463 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(str, true, "GBotAcceptOrder1"); |
| 5464 | } else { |
| 5465 | snprintf(str, sizeof(str), TXT_GB_NOWAYcxx . . $ `scripts/AIGame.cpp:128:9`!, (char *)command->ptrcxx . . $ gb_com#ptr.); |
| 5466 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(str, true, "GBotConcern1"); |
| 5467 | } |
| 5468 | } else if (param1 == GBC_RENAME_SILENTcxx . . $ `scripts/AIGame.cpp:1465:9`!) { |
| 5469 | if (strlen((char *)command->ptrcxx . . $ gb_com#ptr.) > 0) { |
| 5470 | strncpy(memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name., (char *)command->ptrcxx . . $ gb_com#ptr., 7); |
| 5471 | memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name.[7] = '\0'; |
| 5472 | } |
| 5473 | } else { |
| 5474 | char str[80]; |
| 5475 | snprintf(str, sizeof(str), TXT_GB_STRIKEcxx . . $ `scripts/AIGame.cpp:129:9`!, param1); |
| 5476 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(str, true, "GBotConern1", true); |
| 5477 | } |
| 5478 | } else if (command->actioncxx . . $ gb_com#action. == COM_GET_MENUcxx . . $ `scripts/osiris_common.h:954:9`!) { |
| 5479 | int i; |
| 5480 | gb_menucxx . . $ gb_menu# *menu = (gb_menucxx . . $ gb_menu# *)command->ptrcxx . . $ gb_com#ptr.; |
| 5481 | int cur_command = 0; |
| 5482 | |
| 5483 | strcpy(menu->titlecxx . . $ gb_menu#title., TXT_GB_MENUTITLEcxx . . $ `scripts/AIGame.cpp:130:9`!); |
| 5484 | |
| 5485 | int gbc_list[NUM_GB_COMMANDScxx . . $ `scripts/AIGame.cpp:1418:9`!]; |
| 5486 | menu->num_commandscxx . . $ gb_menu#num_commands. = MakeCommandListcxx . . $ GuideBot#MakeCommandList(a5f7824ee4986326).(gbc_list); |
| 5487 | |
| 5488 | for (i = 0; i < menu->num_commandscxx . . $ gb_menu#num_commands.; i++) { |
| 5489 | int c_index = gbc_list[i]; |
| 5490 | |
| 5491 | if (c_index >= GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`! && c_index <= GBC_FIND_MARKER_7cxx . . $ `scripts/AIGame.cpp:1455:9`!) { |
| 5492 | memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup. = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_MARKERcxx . . $ `Descent3/object_external.h:175:9`!, c_index - GBC_FIND_MARKER_0cxx . . $ `scripts/AIGame.cpp:1448:9`!, false, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5493 | |
| 5494 | char message[256]; |
| 5495 | char marker_message[256]; |
| 5496 | |
| 5497 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->g_powerupcxx . . $ guidebot_data#g_powerup., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_PC_MARKER_MESSAGEcxx . . $ `scripts/osiris_common.h:645:9`!, marker_message); |
| 5498 | |
| 5499 | if (/*strlen(marker_message) > 12*/ 0) { |
| 5500 | marker_message[11] = '\0'; |
| 5501 | |
| 5502 | while (strlen(marker_message) > 0 && marker_message[strlen(marker_message) - 1] == ' ') { |
| 5503 | marker_message[strlen(marker_message) - 1] = '\0'; |
| 5504 | } |
| 5505 | |
| 5506 | strcat(marker_message, "..."); |
| 5507 | } |
| 5508 | |
| 5509 | snprintf(message, sizeof(message), TXT_GB_FINDMARKMENUcxx . . $ `scripts/AIGame.cpp:131:9`!, marker_message); |
| 5510 | strcpy(menu->command_textcxx . . $ gb_menu#command_text.[i], message); |
| 5511 | } else if (c_index >= GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`! && c_index <= GBC_FIND_ACTIVE_GOAL_7cxx . . $ `scripts/AIGame.cpp:1431:9`!) { |
| 5512 | int g_id; |
| 5513 | char message[256]; |
| 5514 | |
| 5515 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_ACTIVE_PRIMARY_GOALcxx . . $ `scripts/osiris_common.h:713:9`!, &g_id, c_index - GBC_FIND_ACTIVE_GOAL_0cxx . . $ `scripts/AIGame.cpp:1424:9`!); |
| 5516 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_PC_LOCATION_NAMEcxx . . $ `scripts/osiris_common.h:720:9`!, &message, g_id); |
| 5517 | |
| 5518 | if (/* strlen(message) > 19 */ 0) { |
| 5519 | message[18] = '\0'; |
| 5520 | |
| 5521 | while (strlen(message) > 0 && message[strlen(message) - 1] == ' ') { |
| 5522 | message[strlen(message) - 1] = '\0'; |
| 5523 | } |
| 5524 | |
| 5525 | strcat(message, "..."); |
| 5526 | } |
| 5527 | snprintf(menu->command_textcxx . . $ gb_menu#command_text.[i], sizeof(menu->command_textcxx . . $ gb_menu#command_text.[i]), TXT_GB_GETTOcxx . . $ `scripts/AIGame.cpp:132:9`!, message); |
| 5528 | } else if (c_index >= GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`! && c_index <= GBC_FIND_ACTIVE_SEC_GOAL_7cxx . . $ `scripts/AIGame.cpp:1439:9`!) { |
| 5529 | int g_id; |
| 5530 | char message[256]; |
| 5531 | |
| 5532 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_I_ACTIVE_SECONDARY_GOALcxx . . $ `scripts/osiris_common.h:716:9`!, &g_id, c_index - GBC_FIND_ACTIVE_SEC_GOAL_0cxx . . $ `scripts/AIGame.cpp:1432:9`!); |
| 5533 | LGoal_Valuecxx . . $ LGoal_Value(295e93bc75a1dcc5).(VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, LGSV_PC_LOCATION_NAMEcxx . . $ `scripts/osiris_common.h:720:9`!, &message, g_id); |
| 5534 | |
| 5535 | if (/*strlen(message) > 19*/ 0) { |
| 5536 | message[18] = '\0'; |
| 5537 | |
| 5538 | while (strlen(message) > 0 && message[strlen(message) - 1] == ' ') { |
| 5539 | message[strlen(message) - 1] = '\0'; |
| 5540 | } |
| 5541 | |
| 5542 | strcat(message, "..."); |
| 5543 | } |
| 5544 | snprintf(menu->command_textcxx . . $ gb_menu#command_text.[i], sizeof(menu->command_textcxx . . $ gb_menu#command_text.[i]), TXT_GB_GETTOcxx . . $ `scripts/AIGame.cpp:132:9`!, message); |
| 5545 | } else |
| 5546 | strcpy(menu->command_textcxx . . $ gb_menu#command_text.[i], TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(gb_command_text[gbc_list[i]])); |
| 5547 | |
| 5548 | if (gbc_list[i] == GBC_REPAIR_GUIDEBOTcxx . . $ `scripts/AIGame.cpp:1422:9`!) { |
| 5549 | char message[256]; |
| 5550 | snprintf(message, sizeof(message), TXT_GB_SHIELDAMOUNTcxx . . $ `scripts/AIGame.cpp:133:9`!, 5 + 5 * Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.()); |
| 5551 | strcat(menu->command_textcxx . . $ gb_menu#command_text.[i], message); |
| 5552 | } |
| 5553 | |
| 5554 | menu->command_idcxx . . $ gb_menu#command_id.[i] = gbc_list[i]; |
| 5555 | menu->command_typecxx . . $ gb_menu#command_type.[i] = GBCT_EXIT_IMMEDIATELYcxx . . $ `scripts/osiris_common.h:951:9`!; |
| 5556 | |
| 5557 | if (gbc_list[i] == GBC_RENAMEcxx . . $ `scripts/AIGame.cpp:1423:9`!) { |
| 5558 | menu->command_typecxx . . $ gb_menu#command_type.[i] = GBCT_STRING_DIALOGcxx . . $ `scripts/osiris_common.h:952:9`!; |
| 5559 | strcpy(menu->dialog_textcxx . . $ gb_menu#dialog_text.[i], TXT_GB_ENTERNAMEcxx . . $ `scripts/AIGame.cpp:134:9`!); |
| 5560 | } |
| 5561 | } |
| 5562 | } else if (command->actioncxx . . $ gb_com#action. == COM_POWERUP_NOTIFYcxx . . $ `scripts/AIGame.cpp:1507:9`!) { |
| 5563 | SetSubModecxx . . $ GuideBot#SetSubMode(db021eaee9c3e7a9).(me, GBSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1402:9`!, it); |
| 5564 | } else if (command->actioncxx . . $ gb_com#action. == COM_POWERUP_PICKUPcxx . . $ `scripts/AIGame.cpp:1508:9`!) { |
| 5565 | int type = command->indexcxx . . $ gb_com#index.; |
| 5566 | |
| 5567 | if (type >= 0 && type <= 5) { |
| 5568 | int s_id = Sound_FindIdcxx . . $ Sound_FindId.("Powerup pickup"); |
| 5569 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, s_id); |
| 5570 | |
| 5571 | if (type == GB_POW_SPEEDcxx . . $ `scripts/AIGame.cpp:1500:9`!) { |
| 5572 | float speed; |
| 5573 | float acc; |
| 5574 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 5575 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 5576 | |
| 5577 | if (acc == memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc. && speed == memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed.) { |
| 5578 | speed *= 3.0f; |
| 5579 | acc *= 6.0f; |
| 5580 | |
| 5581 | memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. = 30.0f; |
| 5582 | |
| 5583 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 5584 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 5585 | } |
| 5586 | } else { |
| 5587 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[type]++; |
| 5588 | } |
| 5589 | |
| 5590 | msafe_structcxx . . $ msafe_struct# mo; |
| 5591 | mo.objhandlecxx . . $ msafe_struct#objhandle. = it; |
| 5592 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 5593 | |
| 5594 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(gb_pow_pickup_text[type]), true, "GBotExcited1"); |
| 5595 | SetSubModecxx . . $ GuideBot#SetSubMode(db021eaee9c3e7a9).(me, GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!); |
| 5596 | } |
| 5597 | } |
| 5598 | |
| 5599 | return true; |
| 5600 | } |
| 5601 | |
| 5602 | void GuideBotcxx . . $ GuideBot#::DoCollidecxx . . $ GuideBot#DoCollide(bbb8461685d7aa69).(int me, tOSIRISEVTCOLLIDEcxx . . $ tOSIRISEVTCOLLIDE# *evt_collide) { |
| 5603 | int obj_type; |
| 5604 | int its_parent; |
| 5605 | float rand_val; |
| 5606 | |
| 5607 | int it_type; |
| 5608 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(evt_collide->it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &it_type); |
| 5609 | |
| 5610 | rand_val = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 5611 | |
| 5612 | // Add a buddy bot to you inventory :) |
| 5613 | if (memorycxx . . $ GuideBot#memory.->f_pickupcxx . . $ guidebot_data#f_pickup. == true) { |
| 5614 | if (it_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 5615 | uint16_tcxx . . $ uint16_t# id; |
| 5616 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(evt_collide->it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 5617 | |
| 5618 | if (id == memorycxx . . $ GuideBot#memory.->mp_slotcxx . . $ guidebot_data#mp_slot.) { |
| 5619 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1396:9`!); |
| 5620 | } |
| 5621 | } |
| 5622 | } else { |
| 5623 | // Run back to the player when you get hit |
| 5624 | if (it_type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) { |
| 5625 | // 30% of the time - and not within 5 seconds - the buddy will come |
| 5626 | // back to the player for protection |
| 5627 | |
| 5628 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(evt_collide->it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!, &its_parent); |
| 5629 | |
| 5630 | if (its_parent == memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.) { |
| 5631 | if (rand_val > 0.8f) { |
| 5632 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBHIT1cxx . . $ `scripts/AIGame.cpp:135:9`!, false, "GBotConcern1"); |
| 5633 | } else if (rand_val > 0.6) { |
| 5634 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBHIT2cxx . . $ `scripts/AIGame.cpp:136:9`!, false, "GBotConcern1"); |
| 5635 | } else if (rand_val > 0.4) { |
| 5636 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBHIT3cxx . . $ `scripts/AIGame.cpp:137:9`!, false, "GBotConcern1"); |
| 5637 | } |
| 5638 | } else if (memorycxx . . $ GuideBot#memory.->last_retreat_timecxx . . $ guidebot_data#last_retreat_time. + 5.0 < Game_GetTimecxx . . $ Game_GetTime.()) |
| 5639 | ; |
| 5640 | { |
| 5641 | if (rand_val > 0.7) { |
| 5642 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 2, 1.0f, -1, 0, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5643 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 2, 40.0f); |
| 5644 | |
| 5645 | memorycxx . . $ GuideBot#memory.->last_retreat_timecxx . . $ guidebot_data#last_retreat_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 5646 | |
| 5647 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBHIT4cxx . . $ `scripts/AIGame.cpp:138:9`!, true, "GBotConcern1"); |
| 5648 | } else { |
| 5649 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBHIT5cxx . . $ `scripts/AIGame.cpp:139:9`!, true, "GBotConcern1"); |
| 5650 | } |
| 5651 | } |
| 5652 | } |
| 5653 | } |
| 5654 | } |
| 5655 | |
| 5656 | bool GuideBotcxx . . $ GuideBot#::DoUsecxx . . $ GuideBot#DoUse(83c267b20bac841a).(int me) { |
| 5657 | int p_handle; |
| 5658 | int sad_sound; |
| 5659 | int buddy_handle; |
| 5660 | |
| 5661 | // NOTE: Use is done on the inventory item and/or the real guidebot |
| 5662 | // don't set and guidebot global variables in here. Do it in the |
| 5663 | // EVT_CREATE in the f_valid block |
| 5664 | |
| 5665 | gb_comcxx . . $ gb_com# command; |
| 5666 | |
| 5667 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!, &p_handle); |
| 5668 | |
| 5669 | if (p_handle == OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 5670 | p_handle = memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.; |
| 5671 | } else { |
| 5672 | memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player. = p_handle; |
| 5673 | } |
| 5674 | |
| 5675 | mprintfcxx . . $ mprintf.(0, "1 Player %d\n", p_handle); |
| 5676 | mprintfcxx . . $ mprintf.(0, "2 Player %d\n", memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5677 | |
| 5678 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(p_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_I_BUDDY_HANDLEcxx . . $ `scripts/osiris_common.h:464:9`!, &buddy_handle); |
| 5679 | |
| 5680 | command.actioncxx . . $ gb_com#action. = COM_REINITcxx . . $ `scripts/osiris_common.h:956:9`!; |
| 5681 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 5682 | ei.extra_infocxx . . $ tOSIRISEventInfo#extra_info. = (void *)&command; |
| 5683 | ei.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. = AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!; |
| 5684 | |
| 5685 | return Obj_CallEventcxx . . $ Obj_CallEvent.(buddy_handle, EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!, &ei); |
| 5686 | } |
| 5687 | |
| 5688 | bool GuideBotcxx . . $ GuideBot#::DoInitcxx . . $ GuideBot#DoInit(9609253e83e89946).(int me, bool f_reinit) { |
| 5689 | vectorcxx . . $ vector# fvec; |
| 5690 | vectorcxx . . $ vector# vel; |
| 5691 | bool f_valid; |
| 5692 | matrixcxx . . $ matrix# orient; |
| 5693 | vectorcxx . . $ vector# pos; |
| 5694 | int room; |
| 5695 | int i; |
| 5696 | |
| 5697 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 5698 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 5699 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(guidebot_datacxx . . $ guidebot_data#); |
| 5700 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 5701 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 5702 | |
| 5703 | if (!f_reinit) { |
| 5704 | memorycxx . . $ GuideBot#memory. = (guidebot_datacxx . . $ guidebot_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 5705 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. = 0; |
| 5706 | |
| 5707 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc.); |
| 5708 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed.); |
| 5709 | |
| 5710 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!, &memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5711 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &memorycxx . . $ GuideBot#memory.->mp_slotcxx . . $ guidebot_data#mp_slot.); |
| 5712 | |
| 5713 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_CS_GUIDEBOTNAMEcxx . . $ `scripts/osiris_common.h:475:9`!, memorycxx . . $ GuideBot#memory.->namecxx . . $ guidebot_data#name.); |
| 5714 | |
| 5715 | // Sets up my invisible helper |
| 5716 | int proom; |
| 5717 | vectorcxx . . $ vector# ppos; |
| 5718 | matrixcxx . . $ matrix# porient; |
| 5719 | |
| 5720 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &proom); |
| 5721 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ppos); |
| 5722 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &porient); |
| 5723 | |
| 5724 | ppos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). porient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 10.0f; |
| 5725 | |
| 5726 | memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle. = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("Invisiblepowerup"), proom, &ppos, &porient, me); |
| 5727 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 5728 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle.; |
| 5729 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!, &mstruct); |
| 5730 | |
| 5731 | // Three fire extinguishers per level |
| 5732 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[0] = 3; |
| 5733 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[1] = 0; |
| 5734 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[2] = 0; |
| 5735 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[3] = 0; |
| 5736 | memorycxx . . $ GuideBot#memory.->powerupscxx . . $ guidebot_data#powerups.[4] = 0; |
| 5737 | |
| 5738 | for (i = 0; i < NUM_GB_SOUNDScxx . . $ `scripts/AIGame.cpp:1502:9`!; i++) { |
| 5739 | memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[i] = -1; |
| 5740 | } |
| 5741 | |
| 5742 | memorycxx . . $ GuideBot#memory.->mecxx . . $ guidebot_data#me. = me; |
| 5743 | |
| 5744 | memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. = GBM_IN_SHIPcxx . . $ `scripts/AIGame.cpp:1384:9`!; |
| 5745 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 5746 | |
| 5747 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[0] = Obj_FindIDcxx . . $ Obj_FindID.("Buddyextinguisher"); |
| 5748 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[1] = Obj_FindIDcxx . . $ Obj_FindID.("buddywingnut"); |
| 5749 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[2] = Obj_FindIDcxx . . $ Obj_FindID.("buddycontrol"); |
| 5750 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[3] = Obj_FindIDcxx . . $ Obj_FindID.("buddyassist"); |
| 5751 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[4] = Obj_FindIDcxx . . $ Obj_FindID.("buddyantivirus"); |
| 5752 | memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[5] = Obj_FindIDcxx . . $ Obj_FindID.("buddyspeed"); |
| 5753 | |
| 5754 | memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots. = 0; |
| 5755 | |
| 5756 | memorycxx . . $ GuideBot#memory.->last_sound_timecxx . . $ guidebot_data#last_sound_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 5757 | memorycxx . . $ GuideBot#memory.->last_at_goal_timecxx . . $ guidebot_data#last_at_goal_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 5758 | |
| 5759 | memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 5760 | memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. = 0.0f; |
| 5761 | } else { |
| 5762 | // If too damaged to exit |
| 5763 | if (memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_VERY_DAMAGEDcxx . . $ `scripts/AIGame.cpp:1406:9`!) { |
| 5764 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GBDAMAGEDcxx . . $ `scripts/AIGame.cpp:140:9`!, true, "GBotConcern1", true); |
| 5765 | return false; |
| 5766 | } |
| 5767 | |
| 5768 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_BIRTHcxx . . $ `scripts/AIGame.cpp:1395:9`!); |
| 5769 | SetSubModecxx . . $ GuideBot#SetSubMode(db021eaee9c3e7a9).(me, GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!); |
| 5770 | } |
| 5771 | |
| 5772 | return true; |
| 5773 | } |
| 5774 | |
| 5775 | bool GuideBotcxx . . $ GuideBot#::DoNotifycxx . . $ GuideBot#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 5776 | tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify = &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.; |
| 5777 | |
| 5778 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!) { |
| 5779 | return DoExternalCommandscxx . . $ GuideBot#DoExternalCommands(70121a6dc333946f).(me, (gb_comcxx . . $ gb_com# *)data->extra_infocxx . . $ tOSIRISEventInfo#extra_info., data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle.); |
| 5780 | } else if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_WHIT_OBJECTcxx . . $ `Descent3/aistruct_external.h:291:9`!) { |
| 5781 | int type; |
| 5782 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(notify->it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 5783 | |
| 5784 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 5785 | if (notify->it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle. == memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.) { |
| 5786 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_OOPScxx . . $ `scripts/AIGame.cpp:141:9`!, true, "GBotConcern1"); |
| 5787 | } |
| 5788 | } else if (type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 5789 | // 35% of the time, the buddy is happy enough to say something when |
| 5790 | // he hits a robot |
| 5791 | if (randcxx . . $ rand(9efc7249d839d30e).() > static_cast<float>(RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 0.65f) { |
| 5792 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_SHOOTROBOTcxx . . $ `scripts/AIGame.cpp:142:9`!, false, "GBotAcceptOrder1"); |
| 5793 | } |
| 5794 | } |
| 5795 | } else if (IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).( |
| 5796 | notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.)) // Goal complete -- chrishack -- print something else on error cases |
| 5797 | { |
| 5798 | mprintfcxx . . $ mprintf.(0, "Goal %d done\n", notify->goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num.); |
| 5799 | |
| 5800 | if (notify->goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 5801 | if (memorycxx . . $ GuideBot#memory.->last_at_goal_timecxx . . $ guidebot_data#last_at_goal_time. + 1.0f > Game_GetTimecxx . . $ Game_GetTime.()) { |
| 5802 | gb_comcxx . . $ gb_com# command; |
| 5803 | |
| 5804 | command.actioncxx . . $ gb_com#action. = COM_DO_ACTIONcxx . . $ `scripts/osiris_common.h:955:9`!; |
| 5805 | command.indexcxx . . $ gb_com#index. = GBC_ESCORT_SHIPcxx . . $ `scripts/AIGame.cpp:1456:9`!; |
| 5806 | DoExternalCommandscxx . . $ GuideBot#DoExternalCommands(70121a6dc333946f).(me, &command, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5807 | return true; |
| 5808 | } |
| 5809 | |
| 5810 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_GOAL1cxx . . $ `scripts/AIGame.cpp:143:9`!, false, "GBotAcceptOrder1"); |
| 5811 | memorycxx . . $ GuideBot#memory.->last_at_goal_timecxx . . $ guidebot_data#last_at_goal_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 5812 | |
| 5813 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 2, 1.0, GB_GUID_RETURNED_TO_PLAYERcxx . . $ `scripts/AIGame.cpp:1380:9`!, GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 5814 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 2, 30.0f); |
| 5815 | } else if (notify->goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 2 && notify->goal_uidcxx . . $ tOSIRISEVTAINOTIFY#goal_uid. == GB_GUID_RETURNED_TO_PLAYERcxx . . $ `scripts/AIGame.cpp:1380:9`!) { |
| 5816 | mprintfcxx . . $ mprintf.(0, "HERERWERSEFSDF\n"); |
| 5817 | bool f_used; |
| 5818 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 5819 | if (f_used) { |
| 5820 | mprintfcxx . . $ mprintf.(0, "FUCKME\n"); |
| 5821 | |
| 5822 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) |
| 5823 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_GOAL2cxx . . $ `scripts/AIGame.cpp:144:9`!, false, "GBotGreetB1"); |
| 5824 | else |
| 5825 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_GOAL3cxx . . $ `scripts/AIGame.cpp:145:9`!, false, "GBotGreetB1"); |
| 5826 | } |
| 5827 | |
| 5828 | memorycxx . . $ GuideBot#memory.->time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare. = 3.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 5829 | memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 5830 | } |
| 5831 | } else if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_SCRIPTED_ORIENTcxx . . $ `Descent3/aistruct_external.h:311:9`!) { |
| 5832 | matrixcxx . . $ matrix# orient; |
| 5833 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 5834 | |
| 5835 | AI_TurnTowardsVectorscxx . . $ AI_TurnTowardsVectors.(me, &orient.fveccxx . . $ matrix#fvec., &orient.uveccxx . . $ matrix#uvec.); |
| 5836 | } |
| 5837 | |
| 5838 | return true; |
| 5839 | } |
| 5840 | |
| 5841 | void GuideBotcxx . . $ GuideBot#::DoPowerupCheckcxx . . $ GuideBot#DoPowerupCheck(d4f767463ce0a6b3).(int me) { |
| 5842 | if (memorycxx . . $ GuideBot#memory.->next_powerup_check_timecxx . . $ guidebot_data#next_powerup_check_time. <= Game_GetTimecxx . . $ Game_GetTime.() && memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. == GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!) { |
| 5843 | vectorcxx . . $ vector# pos; |
| 5844 | int room; |
| 5845 | int scan_objs[80]; |
| 5846 | int n_scan; |
| 5847 | int i; |
| 5848 | |
| 5849 | memorycxx . . $ GuideBot#memory.->next_powerup_check_timecxx . . $ guidebot_data#next_powerup_check_time. = Game_GetTimecxx . . $ Game_GetTime.() + 2.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 5850 | |
| 5851 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 5852 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 5853 | |
| 5854 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 200.0f, scan_objs, 80, false, true, false, true); |
| 5855 | |
| 5856 | for (i = 0; i < n_scan; i++) { |
| 5857 | int type; |
| 5858 | int16_t id; |
| 5859 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 5860 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 5861 | |
| 5862 | if (type == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) { |
| 5863 | bool f_for_me = false; |
| 5864 | int j; |
| 5865 | |
| 5866 | for (j = 0; j < 6; j++) { |
| 5867 | if (memorycxx . . $ GuideBot#memory.->powerup_idscxx . . $ guidebot_data#powerup_ids.[j] == id) { |
| 5868 | f_for_me = true; |
| 5869 | break; |
| 5870 | } |
| 5871 | } |
| 5872 | |
| 5873 | if (f_for_me) { |
| 5874 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# data; |
| 5875 | gb_comcxx . . $ gb_com# command; |
| 5876 | |
| 5877 | command.actioncxx . . $ gb_com#action. = COM_POWERUP_NOTIFYcxx . . $ `scripts/AIGame.cpp:1507:9`!; |
| 5878 | |
| 5879 | DoExternalCommandscxx . . $ GuideBot#DoExternalCommands(70121a6dc333946f).(me, &command, scan_objs[i]); |
| 5880 | |
| 5881 | break; |
| 5882 | } |
| 5883 | } |
| 5884 | } |
| 5885 | } |
| 5886 | } |
| 5887 | |
| 5888 | void GuideBotcxx . . $ GuideBot#::DoFramecxx . . $ GuideBot#DoFrame(d4f767463ce0a6b3).(int me) { |
| 5889 | int dir_index; |
| 5890 | int flags; |
| 5891 | float anim; |
| 5892 | float last_mode_time; |
| 5893 | |
| 5894 | int proom; |
| 5895 | vectorcxx . . $ vector# ppos; |
| 5896 | matrixcxx . . $ matrix# porient; |
| 5897 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &proom); |
| 5898 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ppos); |
| 5899 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &porient); |
| 5900 | |
| 5901 | ppos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). porient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 40.0f; |
| 5902 | ppos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). porient.uveccxx . . $ matrix#uvec. *cxx . . $ `operator*`(252247219a31502c). 10.0f; |
| 5903 | |
| 5904 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &proom); |
| 5905 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ppos); |
| 5906 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->amb_camera_handlecxx . . $ guidebot_data#amb_camera_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &porient); |
| 5907 | |
| 5908 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!) |
| 5909 | DoPowerupCheckcxx . . $ GuideBot#DoPowerupCheck(d4f767463ce0a6b3).(me); |
| 5910 | |
| 5911 | if (memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_WANTING_TO_ENTER_PDEADcxx . . $ `scripts/AIGame.cpp:1416:9`!) { |
| 5912 | int flags; |
| 5913 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_I_FLAGScxx . . $ `scripts/osiris_common.h:481:9`!, &flags); |
| 5914 | if (!(flags & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!)) { |
| 5915 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_RESPAWN_ENTER_SHIPcxx . . $ `scripts/AIGame.cpp:1397:9`!); |
| 5916 | } |
| 5917 | } else { |
| 5918 | int flags; |
| 5919 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_I_FLAGScxx . . $ `scripts/osiris_common.h:481:9`!, &flags); |
| 5920 | if (flags & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!) { |
| 5921 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 0.0f, 0.0f); |
| 5922 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. |= GBF_WANTING_TO_ENTER_PDEADcxx . . $ `scripts/AIGame.cpp:1416:9`!; |
| 5923 | } |
| 5924 | } |
| 5925 | |
| 5926 | if (memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. > 0.0f) { |
| 5927 | if (memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. > 15.0f && memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. - Game_GetFrameTimecxx . . $ Game_GetFrameTime.() <= 15.0f) { |
| 5928 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_POW_ACC_ALMOST_DONEcxx . . $ `scripts/AIGame.cpp:200:9`!, true, "GBotExcited1"); |
| 5929 | } |
| 5930 | |
| 5931 | memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 5932 | if (memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. <= 0.0f) { |
| 5933 | memorycxx . . $ GuideBot#memory.->speed_time_leftcxx . . $ guidebot_data#speed_time_left. = 0.0f; |
| 5934 | |
| 5935 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ GuideBot#memory.->max_speedcxx . . $ guidebot_data#max_speed.); |
| 5936 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ GuideBot#memory.->max_acccxx . . $ guidebot_data#max_acc.); |
| 5937 | |
| 5938 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_POW_DEPLETEDcxx . . $ `scripts/AIGame.cpp:199:9`!, true, "GBotPlayerKillBot1"); |
| 5939 | } |
| 5940 | } |
| 5941 | |
| 5942 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`! && Obj_IsEffectcxx . . $ Obj_IsEffect.(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., EF_NAPALMEDcxx . . $ `Descent3/object_external.h:200:9`!)) { |
| 5943 | int room; |
| 5944 | float damage = 0.0f; |
| 5945 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 5946 | Room_Valuecxx . . $ Room_Value(504a19c195c7574e).(room, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, RMV_F_DAMAGEcxx . . $ `scripts/osiris_common.h:704:9`!, &damage); |
| 5947 | |
| 5948 | if (damage == 0.0f) { |
| 5949 | InitExtinguishcxx . . $ GuideBot#InitExtinguish(efaadfb7dc14930a).(true); |
| 5950 | } |
| 5951 | } |
| 5952 | |
| 5953 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &anim); |
| 5954 | if (anim < 0 || anim > 12) { |
| 5955 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. |= GBF_IN_CUSTOM_ANIMcxx . . $ `scripts/AIGame.cpp:1413:9`!; |
| 5956 | } else { |
| 5957 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= ~GBF_IN_CUSTOM_ANIMcxx . . $ `scripts/AIGame.cpp:1413:9`!; |
| 5958 | } |
| 5959 | |
| 5960 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 5961 | |
| 5962 | last_mode_time = memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time.; |
| 5963 | memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 5964 | |
| 5965 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_ON_FIREcxx . . $ `scripts/AIGame.cpp:1390:9`!) { |
| 5966 | } else if ((flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!)) { |
| 5967 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_ON_FIREcxx . . $ `scripts/AIGame.cpp:1390:9`!); |
| 5968 | } else if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_BIRTHcxx . . $ `scripts/AIGame.cpp:1395:9`!) { |
| 5969 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. > 1.2f) { |
| 5970 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 5971 | } |
| 5972 | |
| 5973 | return; |
| 5974 | } else if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`!) { |
| 5975 | if (!(memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_IN_CUSTOM_ANIMcxx . . $ `scripts/AIGame.cpp:1413:9`!) && last_mode_time < 0.5f && memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. >= 0.5f) { |
| 5976 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 12.0f, 23.0f, 1.0f, 0); |
| 5977 | } |
| 5978 | |
| 5979 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time.) { |
| 5980 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 0.6f; |
| 5981 | |
| 5982 | int dir_index = randcxx . . $ rand(9efc7249d839d30e).() % 6; |
| 5983 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_ORIENT_GOAL_OBJcxx . . $ `Descent3/aistruct_external.h:235:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, |
| 5984 | memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[0], dir_index); |
| 5985 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 0, 20.0); |
| 5986 | } |
| 5987 | |
| 5988 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. < 25.0f) { |
| 5989 | if (memorycxx . . $ GuideBot#memory.->last_animcxx . . $ guidebot_data#last_anim. <= 18 && anim > 18) { |
| 5990 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 23.0f, 33.0f, 1.5f, AIAF_LOOPINGcxx . . $ `Descent3/aistruct_external.h:115:9`!); |
| 5991 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. |= GBF_WANT_TO_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1411:9`!; |
| 5992 | } |
| 5993 | |
| 5994 | if ((memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. & GBF_WANT_TO_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1411:9`!) && anim >= 23 && anim <= 33) { |
| 5995 | int s_id = Sound_FindIdcxx . . $ Sound_FindId.("GBotEuphoria1"); |
| 5996 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, s_id); |
| 5997 | |
| 5998 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 5999 | |
| 6000 | mstruct.randomcxx . . $ msafe_struct#random. = 21; |
| 6001 | mstruct.is_realcxx . . $ msafe_struct#is_real. = 0; |
| 6002 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 6003 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = 1; |
| 6004 | mstruct.effect_typecxx . . $ msafe_struct#effect_type. = MED_SMOKE_INDEXcxx . . $ `Descent3/fireball_external.h:29:9`!; |
| 6005 | mstruct.phys_infocxx . . $ msafe_struct#phys_info. = 0; |
| 6006 | mstruct.dragcxx . . $ msafe_struct#drag. = .001f; |
| 6007 | mstruct.masscxx . . $ msafe_struct#mass. = .001f; |
| 6008 | mstruct.intervalcxx . . $ msafe_struct#interval. = .025f; |
| 6009 | mstruct.longevitycxx . . $ msafe_struct#longevity. = 100000.0f; |
| 6010 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 1.0; |
| 6011 | mstruct.sizecxx . . $ msafe_struct#size. = 4.2f; |
| 6012 | mstruct.speedcxx . . $ msafe_struct#speed. = 120.0; |
| 6013 | |
| 6014 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!, &mstruct); |
| 6015 | |
| 6016 | memorycxx . . $ GuideBot#memory.->extinguish_spew_idcxx . . $ guidebot_data#extinguish_spew_id. = mstruct.idcxx . . $ msafe_struct#id.; |
| 6017 | |
| 6018 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. &= ~GBF_WANT_TO_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1411:9`!; |
| 6019 | memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. |= GBF_EXTINGUISHINGcxx . . $ `scripts/AIGame.cpp:1412:9`!; |
| 6020 | } |
| 6021 | |
| 6022 | if (memorycxx . . $ GuideBot#memory.->flagscxx . . $ guidebot_data#flags. | GBF_EXTINGUISHINGcxx . . $ `scripts/AIGame.cpp:1412:9`!) { |
| 6023 | int flags; |
| 6024 | vectorcxx . . $ vector# me_pos; |
| 6025 | vectorcxx . . $ vector# it_pos; |
| 6026 | matrixcxx . . $ matrix# orient; |
| 6027 | |
| 6028 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:593:9`!, &flags); |
| 6029 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &me_pos); |
| 6030 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 6031 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[0], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &it_pos); |
| 6032 | |
| 6033 | vectorcxx . . $ vector# dir_to_goal = it_pos -cxx . . $ operator-(b77b703cd1e43e33). me_pos; |
| 6034 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir_to_goal); |
| 6035 | |
| 6036 | if ((flags & AISR_CIRCLE_DISTcxx . . $ `Descent3/aistruct_external.h:396:9`!) && (dir_to_goal *cxx . . $ `operator*`(4a721543d64e126a). orient.fveccxx . . $ matrix#fvec. > 0.4717f) && anim >= 23 && anim <= 33) |
| 6037 | memorycxx . . $ GuideBot#memory.->extinguish_obj_timecxx . . $ guidebot_data#extinguish_obj_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6038 | |
| 6039 | if (memorycxx . . $ GuideBot#memory.->extinguish_obj_timecxx . . $ guidebot_data#extinguish_obj_time. > 1.5f) { |
| 6040 | // Turns off fire if being sprayed for 2.5 seconds |
| 6041 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[0], 0.0f, 0.0f); |
| 6042 | |
| 6043 | if (memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs. > 1) { |
| 6044 | int i; |
| 6045 | for (i = 0; i < memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs. - 1; i++) { |
| 6046 | memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[i] = memorycxx . . $ GuideBot#memory.->extinguish_obj_listcxx . . $ guidebot_data#extinguish_obj_list.[i + 1]; |
| 6047 | } |
| 6048 | memorycxx . . $ GuideBot#memory.->num_extinguish_objscxx . . $ guidebot_data#num_extinguish_objs.--; |
| 6049 | |
| 6050 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_EXTINGUISHcxx . . $ `scripts/AIGame.cpp:1394:9`!); |
| 6051 | } else { |
| 6052 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 6053 | } |
| 6054 | } |
| 6055 | } |
| 6056 | } else { |
| 6057 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 6058 | } |
| 6059 | } else if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_RTYPEcxx . . $ `scripts/AIGame.cpp:1392:9`!) { |
| 6060 | int room; |
| 6061 | vectorcxx . . $ vector# pos; |
| 6062 | matrixcxx . . $ matrix# orient; |
| 6063 | |
| 6064 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 6065 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 6066 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 6067 | |
| 6068 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 3.0f; |
| 6069 | pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.uveccxx . . $ matrix#uvec. *cxx . . $ `operator*`(252247219a31502c). 10.0f; |
| 6070 | |
| 6071 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 6072 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 6073 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 6074 | |
| 6075 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. < 15.0f && memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 15.0f) { |
| 6076 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FIFTEEN_SEC_TO_GOcxx . . $ `scripts/AIGame.cpp:198:9`!, true, "GBotExcited1"); |
| 6077 | } |
| 6078 | |
| 6079 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. > 30.0) { |
| 6080 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_POW_DEPLETEDcxx . . $ `scripts/AIGame.cpp:199:9`!, true, "GBotPlayerKillBot1"); |
| 6081 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 6082 | } |
| 6083 | } else if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_GO_WINGNUTcxx . . $ `scripts/AIGame.cpp:1393:9`!) { |
| 6084 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time.) { |
| 6085 | memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time. = Game_GetTimecxx . . $ Game_GetTime.() + 1.0f; |
| 6086 | |
| 6087 | // In general, Turn on friend avoidance |
| 6088 | int flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 6089 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6090 | |
| 6091 | int dir_index = randcxx . . $ rand(9efc7249d839d30e).() % 6; |
| 6092 | float interval = 2.0f; |
| 6093 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 3, 1.0f, -1, GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., dir_index); |
| 6094 | AI_GoalAddEnablercxx . . $ AI_GoalAddEnabler.(me, 3, AIE_GT_LAST_SEE_TARGET_INTERVALcxx . . $ `Descent3/aistruct_external.h:160:9`!, 1.0f, 0.0f, &interval); |
| 6095 | |
| 6096 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 3, 27.0); |
| 6097 | } |
| 6098 | |
| 6099 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. < 15.0f && memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 15.0f) { |
| 6100 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_FIFTEEN_SEC_TO_GOcxx . . $ `scripts/AIGame.cpp:198:9`!, true, "GBotExcited1"); |
| 6101 | } |
| 6102 | |
| 6103 | if (memorycxx . . $ GuideBot#memory.->mode_timecxx . . $ guidebot_data#mode_time. > 30.0) { |
| 6104 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_POW_DEPLETEDcxx . . $ `scripts/AIGame.cpp:199:9`!, true, "GBotPlayerKillBot1"); |
| 6105 | SetModecxx . . $ GuideBot#SetMode(ae3be0daf8fa724d).(me, GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!); |
| 6106 | } |
| 6107 | } else { |
| 6108 | if (memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[GBS_AMBIENTcxx . . $ `scripts/AIGame.cpp:1504:9`!] == -1) { |
| 6109 | int s_index = Sound_FindIdcxx . . $ Sound_FindId.("GBotEngineB1"); |
| 6110 | memorycxx . . $ GuideBot#memory.->soundscxx . . $ guidebot_data#sounds.[GBS_AMBIENTcxx . . $ `scripts/AIGame.cpp:1504:9`!] = Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, s_index); |
| 6111 | } |
| 6112 | |
| 6113 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!) { |
| 6114 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ GuideBot#memory.->next_ambient_timecxx . . $ guidebot_data#next_ambient_time.) { |
| 6115 | ReInitAmbientcxx . . $ GuideBot#ReInitAmbient(d4f767463ce0a6b3).(me); |
| 6116 | } |
| 6117 | } |
| 6118 | |
| 6119 | // Allow the buddy to collide with his player after 3 seconds |
| 6120 | if (memorycxx . . $ GuideBot#memory.->f_parentedcxx . . $ guidebot_data#f_parented. == true) { |
| 6121 | float time; |
| 6122 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_CREATION_TIMEcxx . . $ `scripts/osiris_common.h:639:9`!, &time); |
| 6123 | |
| 6124 | if (Game_GetTimecxx . . $ Game_GetTime.() - time > 3.0f) { |
| 6125 | int parent = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 6126 | |
| 6127 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_PARENT_HANDLEcxx . . $ `scripts/osiris_common.h:642:9`!, &parent); |
| 6128 | memorycxx . . $ GuideBot#memory.->f_parentedcxx . . $ guidebot_data#f_parented. = false; |
| 6129 | } |
| 6130 | } |
| 6131 | |
| 6132 | memorycxx . . $ GuideBot#memory.->time_till_next_pvis_checkcxx . . $ guidebot_data#time_till_next_pvis_check. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6133 | if (memorycxx . . $ GuideBot#memory.->time_till_next_pvis_checkcxx . . $ guidebot_data#time_till_next_pvis_check. <= 0.0f) { |
| 6134 | vectorcxx . . $ vector# start_pos; |
| 6135 | vectorcxx . . $ vector# end_pos; |
| 6136 | |
| 6137 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &start_pos); |
| 6138 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &end_pos); |
| 6139 | |
| 6140 | memorycxx . . $ GuideBot#memory.->time_till_next_pvis_checkcxx . . $ guidebot_data#time_till_next_pvis_check. = 0.5f + (0.5f * ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!)); |
| 6141 | |
| 6142 | if (vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&start_pos, &end_pos) < 200.0f) { |
| 6143 | int start_room; |
| 6144 | ray_infocxx . . $ ray_info# ray; |
| 6145 | |
| 6146 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &start_room); |
| 6147 | |
| 6148 | flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 6149 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 6150 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 6151 | |
| 6152 | if (fate == HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 6153 | memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 6154 | } |
| 6155 | } |
| 6156 | // mprintf(0, "Vis check %s\n", (fate==HIT_NONE)?"passed":"failed"); |
| 6157 | // mprintf(0, "Submode %d\n", memory->sub_mode); |
| 6158 | } |
| 6159 | |
| 6160 | if (memorycxx . . $ GuideBot#memory.->modecxx . . $ guidebot_data#mode. == GBM_AMBIENTcxx . . $ `scripts/AIGame.cpp:1385:9`!) { |
| 6161 | memorycxx . . $ GuideBot#memory.->time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6162 | |
| 6163 | if (memorycxx . . $ GuideBot#memory.->time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare. <= 0.0f) { |
| 6164 | memorycxx . . $ GuideBot#memory.->time_till_next_flarecxx . . $ guidebot_data#time_till_next_flare. = 3.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 6165 | |
| 6166 | bool f_used; |
| 6167 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 6168 | if (f_used) { |
| 6169 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 6170 | if (!f_used) { |
| 6171 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 6172 | if (!f_used) { |
| 6173 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 6174 | |
| 6175 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 6176 | |
| 6177 | uint16_tcxx . . $ uint16_t# id; |
| 6178 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 6179 | |
| 6180 | if (Obj_FindIDcxx . . $ Obj_FindID.("GuideBot") == id) { |
| 6181 | mstruct.indexcxx . . $ msafe_struct#index. = Wpn_FindIDcxx . . $ Wpn_FindID.("Yellow flare"); |
| 6182 | } else { |
| 6183 | mstruct.indexcxx . . $ msafe_struct#index. = Wpn_FindIDcxx . . $ Wpn_FindID.("GreenFlare"); |
| 6184 | } |
| 6185 | |
| 6186 | if (mstruct.indexcxx . . $ msafe_struct#index. != -1) { |
| 6187 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = -1; |
| 6188 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("Flare")); |
| 6189 | |
| 6190 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_FIRE_WEAPONcxx . . $ `scripts/osiris_common.h:857:9`!, &mstruct); |
| 6191 | } |
| 6192 | } |
| 6193 | } |
| 6194 | } |
| 6195 | } |
| 6196 | } |
| 6197 | |
| 6198 | // Makes the buddy stay pretty close to his player |
| 6199 | if (memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. + 2.5 < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 6200 | if (Obj_GetObjDistcxx . . $ Obj_GetObjDist(209fdf95ab79e58e).(me, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player., true) > 10.0f && memorycxx . . $ GuideBot#memory.->sub_modecxx . . $ guidebot_data#sub_mode. == GBSM_NONEcxx . . $ `scripts/AIGame.cpp:1400:9`!) { |
| 6201 | DoMessagecxx . . $ GuideBot#DoMessage(8918b8e51c9b576f).(TXT_GB_COMINGBACKcxx . . $ `scripts/AIGame.cpp:146:9`!, false, "GBotAcceptOrder1"); |
| 6202 | |
| 6203 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 2, 1.0f, GB_GUID_RETURNED_TO_PLAYERcxx . . $ `scripts/AIGame.cpp:1380:9`!, GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, memorycxx . . $ GuideBot#memory.->my_playercxx . . $ guidebot_data#my_player.); |
| 6204 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 2, 30.0f); |
| 6205 | } |
| 6206 | |
| 6207 | memorycxx . . $ GuideBot#memory.->return_timecxx . . $ guidebot_data#return_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 6208 | } |
| 6209 | } |
| 6210 | |
| 6211 | memorycxx . . $ GuideBot#memory.->last_animcxx . . $ guidebot_data#last_anim. = anim; |
| 6212 | } |
| 6213 | |
| 6214 | int16_t GuideBotcxx . . $ GuideBot#::CallEventcxx . . $ GuideBot#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 6215 | switch (event) { |
| 6216 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 6217 | return (DoInitcxx . . $ GuideBot#DoInit(9609253e83e89946).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., false) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 6218 | break; |
| 6219 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 6220 | int i; |
| 6221 | |
| 6222 | while (memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots. > 0 && memorycxx . . $ GuideBot#memory.->av_revert_timecxx . . $ guidebot_data#av_revert_time.[0] <= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 6223 | |
| 6224 | int flags = AIF_TEAM_MASKcxx . . $ `Descent3/aistruct_external.h:364:9`!; |
| 6225 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[0], VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6226 | flags = AIF_TEAM_PTMCcxx . . $ `Descent3/aistruct_external.h:365:9`!; |
| 6227 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[0], VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6228 | |
| 6229 | int target_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 6230 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[0], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 6231 | |
| 6232 | for (i = 1; i < memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots.; i++) { |
| 6233 | memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[i - 1] = memorycxx . . $ GuideBot#memory.->av_robot_listcxx . . $ guidebot_data#av_robot_list.[i]; |
| 6234 | } |
| 6235 | |
| 6236 | memorycxx . . $ GuideBot#memory.->num_av_robotscxx . . $ guidebot_data#num_av_robots.--; |
| 6237 | } |
| 6238 | } break; |
| 6239 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 6240 | DoFramecxx . . $ GuideBot#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 6241 | break; |
| 6242 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 6243 | DoCollidecxx . . $ GuideBot#DoCollide(bbb8461685d7aa69).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide.); |
| 6244 | break; |
| 6245 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 6246 | return (DoNotifycxx . . $ GuideBot#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 6247 | break; |
| 6248 | case EVT_USEcxx . . $ `scripts/osiris_common.h:370:9`!: |
| 6249 | return (DoUsecxx . . $ GuideBot#DoUse(83c267b20bac841a).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.) != 0) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 6250 | break; |
| 6251 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 6252 | if (memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 6253 | msafe_structcxx . . $ msafe_struct# mo; |
| 6254 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj.; |
| 6255 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 6256 | |
| 6257 | memorycxx . . $ GuideBot#memory.->camera_objcxx . . $ guidebot_data#camera_obj. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 6258 | } |
| 6259 | break; |
| 6260 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 6261 | memorycxx . . $ GuideBot#memory. = (guidebot_datacxx . . $ guidebot_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 6262 | } break; |
| 6263 | } |
| 6264 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 6265 | } |
| 6266 | |
| 6267 | //--------------- |
| 6268 | // Thief |
| 6269 | //--------------- |
| 6270 | |
| 6271 | void Thiefcxx . . $ Thief#::DoAttackcxx . . $ Thief#DoAttack(3e454b8ccf442868).(int me, int it) {} |
| 6272 | |
| 6273 | bool Thiefcxx . . $ Thief#::DoStealcxx . . $ Thief#DoSteal(54454554f05f9a4a).(int me, int it, int attempt_num, bool f_last_success) { |
| 6274 | int max_tries = numThiefableItemscxx . . $ numThiefableItems.; |
| 6275 | float gen_perc, perc_chance; |
| 6276 | ; |
| 6277 | int i; |
| 6278 | int count_max, count_num; |
| 6279 | bool *attempted_steals; |
| 6280 | |
| 6281 | attempted_steals = (bool *)malloccxx . . $ malloc(9f008b2a9698428b).(numThiefableItemscxx . . $ numThiefableItems. * sizeof(bool)); |
| 6282 | if (!attempted_steals) |
| 6283 | return false; |
| 6284 | |
| 6285 | float ftime = Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6286 | if (ftime == 0) |
| 6287 | ftime = 1.0f; |
| 6288 | srandcxx . . $ srand(6bab9b75950d6f3).(Game_GetTimecxx . . $ Game_GetTime.() / ftime); |
| 6289 | |
| 6290 | for (i = 0; i < numThiefableItemscxx . . $ numThiefableItems.; i++) { |
| 6291 | attempted_steals[i] = false; |
| 6292 | } |
| 6293 | |
| 6294 | while (max_tries--) { |
| 6295 | i = randcxx . . $ rand(9efc7249d839d30e).() % numThiefableItemscxx . . $ numThiefableItems.; |
| 6296 | gen_perc = ((float)randcxx . . $ rand(9efc7249d839d30e).()) / ((float)(RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!)); |
| 6297 | |
| 6298 | perc_chance = (attempt_num == 1) ? ThiefableItemscxx . . $ ThiefableItems.[i].attempt_onecxx . . $ tThiefItems#attempt_one. |
| 6299 | : (f_last_success) ? ThiefableItemscxx . . $ ThiefableItems.[i].attempt_twocxx . . $ tThiefItems#attempt_two. |
| 6300 | : ThiefableItemscxx . . $ ThiefableItems.[i].attempt_two_no_onecxx . . $ tThiefItems#attempt_two_no_one.; |
| 6301 | |
| 6302 | if (attempted_steals[i]) { |
| 6303 | // we already tried this one, try another |
| 6304 | max_tries++; |
| 6305 | continue; |
| 6306 | } |
| 6307 | |
| 6308 | attempted_steals[i] = true; |
| 6309 | |
| 6310 | if (gen_perc <= perc_chance) { |
| 6311 | // check to see if we have the index, if so, take it! |
| 6312 | switch (ThiefableItemscxx . . $ ThiefableItems.[i].typecxx . . $ tThiefItems#type.) { |
| 6313 | case THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!: |
| 6314 | case THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!: |
| 6315 | count_max = MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`!; |
| 6316 | count_num = memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.; |
| 6317 | break; |
| 6318 | case THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!: |
| 6319 | count_max = MAX_STOLEN_INVcxx . . $ `scripts/AIGame.cpp:1626:9`!; |
| 6320 | count_num = memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.; |
| 6321 | break; |
| 6322 | default: |
| 6323 | mprintfcxx . . $ mprintf.(0, "THIEF: INVALID THIEFABLE TYPE!\n"); |
| 6324 | count_max = 0; |
| 6325 | count_num = 0; |
| 6326 | break; |
| 6327 | } |
| 6328 | |
| 6329 | if (count_num >= count_max) { |
| 6330 | mprintfcxx . . $ mprintf.(0, "THIEF: no mo' room\n"); |
| 6331 | continue; // we have no more room |
| 6332 | } |
| 6333 | |
| 6334 | // mprintf(0,"THIEF: Checking %s\n",TXT(ThiefableItems[i].name_idx)); |
| 6335 | |
| 6336 | bool can_take = false; |
| 6337 | int amount = 0; |
| 6338 | char message[256]; |
| 6339 | |
| 6340 | switch (ThiefableItemscxx . . $ ThiefableItems.[i].typecxx . . $ tThiefItems#type.) { |
| 6341 | case THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!: |
| 6342 | // check to see if we can steal the primary |
| 6343 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.); |
| 6344 | if (ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index. != 0 && amount) { |
| 6345 | can_take = true; |
| 6346 | snprintf(message, sizeof(message), TXT_THIEFSTEALcxx . . $ `scripts/AIGame.cpp:147:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(ThiefableItems[i].name_idx)); |
| 6347 | } |
| 6348 | break; |
| 6349 | |
| 6350 | case THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!: |
| 6351 | // check to see if we can steal the secondary |
| 6352 | if (attempt_num <= 1 || (!f_last_success)) { |
| 6353 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.); |
| 6354 | |
| 6355 | if (amount) { |
| 6356 | int max; |
| 6357 | |
| 6358 | if (ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index. > 14) { |
| 6359 | // 2nd selection group (black shark, etc) |
| 6360 | max = (19 - ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.) / 2.5f + 1; |
| 6361 | } else { |
| 6362 | // 1st selection group (mega, etc) |
| 6363 | max = (14 - ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.) / 2.5f + 1; |
| 6364 | } |
| 6365 | |
| 6366 | int new_amount = (randcxx . . $ rand(9efc7249d839d30e).() / (float)(RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 1)) * max + 1; |
| 6367 | |
| 6368 | if (new_amount < amount) |
| 6369 | amount = new_amount; |
| 6370 | |
| 6371 | can_take = true; |
| 6372 | |
| 6373 | if (amount == 1) { |
| 6374 | snprintf(message, sizeof(message), TXT_THIEFSTEAL1cxx . . $ `scripts/AIGame.cpp:148:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(ThiefableItems[i].name_idx)); |
| 6375 | } else { |
| 6376 | snprintf(message, sizeof(message), TXT_THIEFSTEAL2cxx . . $ `scripts/AIGame.cpp:149:9`!, amount, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(ThiefableItems[i].name_idx)); |
| 6377 | } |
| 6378 | } |
| 6379 | } |
| 6380 | |
| 6381 | break; |
| 6382 | |
| 6383 | case THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!: |
| 6384 | // check to see if we can steal the accessory |
| 6385 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_B_THIEF_PLAYERHASITEMcxx . . $ `scripts/osiris_common.h:478:9`!, &can_take, ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.); |
| 6386 | amount = 1; |
| 6387 | |
| 6388 | if (can_take && ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index. == THIEFITEM_AUTOMAPcxx . . $ `scripts/osiris_common.h:772:9`!) { |
| 6389 | // make sure the thief hasn't taken your automap already |
| 6390 | for (int k = 0; k < memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.; k++) { |
| 6391 | if (memorycxx . . $ Thief#memory.->stolen_invcxx . . $ thief_data#stolen_inv.[k].idcxx . . $ inv_item#id. == THIEFITEM_AUTOMAPcxx . . $ `scripts/osiris_common.h:772:9`!) { |
| 6392 | // he has already taken an automap |
| 6393 | can_take = false; |
| 6394 | break; |
| 6395 | } |
| 6396 | } |
| 6397 | } |
| 6398 | |
| 6399 | if (can_take) { |
| 6400 | snprintf(message, sizeof(message), TXT_THIEFSTEALcxx . . $ `scripts/AIGame.cpp:147:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(ThiefableItems[i].name_idx)); |
| 6401 | } |
| 6402 | break; |
| 6403 | } |
| 6404 | |
| 6405 | if (!can_take) |
| 6406 | continue; |
| 6407 | |
| 6408 | mprintfcxx . . $ mprintf.(0, "THIEF: Taking %s\n", TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(ThiefableItems[i].name_idx)); |
| 6409 | |
| 6410 | Player_AddHudMessagecxx . . $ Player_AddHudMessage.(it, message); |
| 6411 | if (randcxx . . $ rand(9efc7249d839d30e).() % 50) { |
| 6412 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefHehHehHeh")); |
| 6413 | } else { |
| 6414 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefLaugh")); |
| 6415 | } |
| 6416 | |
| 6417 | switch (ThiefableItemscxx . . $ ThiefableItems.[i].typecxx . . $ tThiefItems#type.) { |
| 6418 | case THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!: |
| 6419 | case THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!: |
| 6420 | memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.].indexcxx . . $ weapon_item#index. = ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.; |
| 6421 | memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.].ownercxx . . $ weapon_item#owner. = it; |
| 6422 | memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.].amountcxx . . $ weapon_item#amount. = amount; |
| 6423 | memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.++; |
| 6424 | |
| 6425 | if (ThiefableItemscxx . . $ ThiefableItems.[i].typecxx . . $ tThiefItems#type. == THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!) { |
| 6426 | amount = 0; |
| 6427 | } else { |
| 6428 | amount *= -1; |
| 6429 | } |
| 6430 | |
| 6431 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.); |
| 6432 | |
| 6433 | break; |
| 6434 | case THIEFABLEITEM_ACCESSORYcxx . . $ `scripts/AIGame.cpp:1630:9`!: |
| 6435 | memorycxx . . $ Thief#memory.->stolen_invcxx . . $ thief_data#stolen_inv.[memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.].idcxx . . $ inv_item#id. = ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.; |
| 6436 | memorycxx . . $ Thief#memory.->stolen_invcxx . . $ thief_data#stolen_inv.[memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.].ownercxx . . $ inv_item#owner. = it; |
| 6437 | memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.++; |
| 6438 | |
| 6439 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, PLYV_I_THIEF_STEALPLAYERITEMcxx . . $ `scripts/osiris_common.h:479:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, ThiefableItemscxx . . $ ThiefableItems.[i].indexcxx . . $ tThiefItems#index.); |
| 6440 | break; |
| 6441 | } |
| 6442 | |
| 6443 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 6444 | return true; |
| 6445 | } |
| 6446 | } |
| 6447 | |
| 6448 | mprintfcxx . . $ mprintf.(0, "THIEF: Not taking anything\n"); |
| 6449 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 6450 | return false; // we didn't take anything this try |
| 6451 | } |
| 6452 | |
| 6453 | void Thiefcxx . . $ Thief#::DoKidnapcxx . . $ Thief#DoKidnap(3e454b8ccf442868).(int me, int it) { |
| 6454 | if (memorycxx . . $ Thief#memory.->num_stolen_objscxx . . $ thief_data#num_stolen_objs. < MAX_STOLEN_OBJScxx . . $ `scripts/AIGame.cpp:1625:9`!) { |
| 6455 | Obj_Ghostcxx . . $ Obj_Ghost.(it, true); |
| 6456 | memorycxx . . $ Thief#memory.->stolen_objscxx . . $ thief_data#stolen_objs.[memorycxx . . $ Thief#memory.->num_stolen_objscxx . . $ thief_data#num_stolen_objs.++] = it; |
| 6457 | } |
| 6458 | } |
| 6459 | |
| 6460 | void Thiefcxx . . $ Thief#::SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(int me, int submode) { |
| 6461 | if (submode == memorycxx . . $ Thief#memory.->last_special_sub_modecxx . . $ thief_data#last_special_sub_mode.) |
| 6462 | return; |
| 6463 | |
| 6464 | if (memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode. == THIEF_SUB_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1617:9`!) { |
| 6465 | // Make sure we reset the Alert animation |
| 6466 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 0.0f, 6.0f, 1.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6467 | } |
| 6468 | |
| 6469 | if (submode == THIEF_SUB_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1617:9`! && (memorycxx . . $ Thief#memory.->flagscxx . . $ thief_data#flags. & THIEF_F_GOT_POWERUPcxx . . $ `scripts/AIGame.cpp:1621:9`!)) |
| 6470 | return; |
| 6471 | |
| 6472 | if (submode == THIEF_SUB_DROP_POWERUPcxx . . $ `scripts/AIGame.cpp:1618:9`! && !(memorycxx . . $ Thief#memory.->flagscxx . . $ thief_data#flags. & THIEF_F_GOT_POWERUPcxx . . $ `scripts/AIGame.cpp:1621:9`!)) |
| 6473 | return; |
| 6474 | |
| 6475 | // CHRISHACK - we might want to make sure the thief only does some of stuff during |
| 6476 | if (submode != THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`! && submode != THIEF_SUB_CLOAKcxx . . $ `scripts/AIGame.cpp:1615:9`!) { |
| 6477 | float time; |
| 6478 | float last_hear_target_time; |
| 6479 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &time); |
| 6480 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_target_time); |
| 6481 | |
| 6482 | if (Game_GetTimecxx . . $ Game_GetTime.() > time + 2.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 2.0f) { |
| 6483 | return; |
| 6484 | } |
| 6485 | } |
| 6486 | |
| 6487 | switch (submode) { |
| 6488 | case THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!: { |
| 6489 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6490 | memorycxx . . $ Thief#memory.->next_test_timecxx . . $ thief_data#next_test_time. = Game_GetTimecxx . . $ Game_GetTime.() + 10.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() * (1.0f / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f; |
| 6491 | } break; |
| 6492 | case THIEF_SUB_SUMMONcxx . . $ `scripts/AIGame.cpp:1614:9`!: { |
| 6493 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6494 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 12.0f, 19.0f, 0.8f, 0, -1, -1); |
| 6495 | } break; |
| 6496 | case THIEF_SUB_CLOAKcxx . . $ `scripts/AIGame.cpp:1615:9`!: { |
| 6497 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, true); |
| 6498 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 50.0f, 64.0f, 3.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6499 | } break; |
| 6500 | case THIEF_SUB_THROW_ITEMcxx . . $ `scripts/AIGame.cpp:1616:9`!: { |
| 6501 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, true); |
| 6502 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 29.0f, 50.0f, 3.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6503 | } break; |
| 6504 | case THIEF_SUB_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1617:9`!: { |
| 6505 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6506 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 29.0f, 29.0f, 0.1f, AIAF_LOOPINGcxx . . $ `Descent3/aistruct_external.h:115:9`!); |
| 6507 | } break; |
| 6508 | case THIEF_SUB_DROP_POWERUPcxx . . $ `scripts/AIGame.cpp:1618:9`!: { |
| 6509 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, true); |
| 6510 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 145.0f, 160.0f, 2.3f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6511 | } break; |
| 6512 | } |
| 6513 | |
| 6514 | if (submode != THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!) { |
| 6515 | memorycxx . . $ Thief#memory.->last_special_sub_modecxx . . $ thief_data#last_special_sub_mode. = submode; |
| 6516 | } |
| 6517 | |
| 6518 | memorycxx . . $ Thief#memory.->sub_mode_timecxx . . $ thief_data#sub_mode_time. = 0.0f; |
| 6519 | memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode. = submode; |
| 6520 | } |
| 6521 | |
| 6522 | void Thiefcxx . . $ Thief#::DoSubModeFramecxx . . $ Thief#DoSubModeFrame(d4f767463ce0a6b3).(int me) { |
| 6523 | float anim_frame; |
| 6524 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &anim_frame); |
| 6525 | |
| 6526 | msafe_structcxx . . $ msafe_struct# m; |
| 6527 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 6528 | |
| 6529 | switch (memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode.) { |
| 6530 | case THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!: { |
| 6531 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ Thief#memory.->next_test_timecxx . . $ thief_data#next_test_time.) { |
| 6532 | int r_val = (randcxx . . $ rand(9efc7249d839d30e).() % 5) + 1; |
| 6533 | SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(me, r_val); |
| 6534 | |
| 6535 | // In case above failed, make sure there is a time gap between submode checks |
| 6536 | memorycxx . . $ Thief#memory.->next_test_timecxx . . $ thief_data#next_test_time. = Game_GetTimecxx . . $ Game_GetTime.() + 10.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() * (1.0f / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f; |
| 6537 | } |
| 6538 | } break; |
| 6539 | case THIEF_SUB_SUMMONcxx . . $ `scripts/AIGame.cpp:1614:9`!: { |
| 6540 | |
| 6541 | if (anim_frame >= 12.0f && anim_frame < 19.0f) { |
| 6542 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 19.0f, 23.0f, 0.8f, AIAF_LOOPINGcxx . . $ `Descent3/aistruct_external.h:115:9`!); |
| 6543 | } |
| 6544 | |
| 6545 | if (anim_frame > 19.0f && anim_frame < 23.0f) { |
| 6546 | if (memorycxx . . $ Thief#memory.->last_summon_timecxx . . $ thief_data#last_summon_time. + 0.25f <= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 6547 | memorycxx . . $ Thief#memory.->last_summon_timecxx . . $ thief_data#last_summon_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 6548 | |
| 6549 | // Chrishack - do summon stuff here |
| 6550 | } |
| 6551 | } |
| 6552 | |
| 6553 | if (memorycxx . . $ Thief#memory.->sub_mode_timecxx . . $ thief_data#sub_mode_time. > 6.0f && anim_frame >= 19.0f && anim_frame <= 23.0f) { |
| 6554 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 23.0f, 29.0f, 0.8f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6555 | SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(me, THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!); |
| 6556 | } |
| 6557 | |
| 6558 | } break; |
| 6559 | case THIEF_SUB_CLOAKcxx . . $ `scripts/AIGame.cpp:1615:9`!: { |
| 6560 | if (anim_frame > 61.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 61.0f) { |
| 6561 | m.lifetimecxx . . $ msafe_struct#lifetime. = 15.0f; |
| 6562 | m.statecxx . . $ msafe_struct#state. = 1; |
| 6563 | |
| 6564 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_CLOAKcxx . . $ `scripts/osiris_common.h:837:9`!, &m); |
| 6565 | |
| 6566 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6567 | } |
| 6568 | } break; |
| 6569 | case THIEF_SUB_THROW_ITEMcxx . . $ `scripts/AIGame.cpp:1616:9`!: { |
| 6570 | if (anim_frame > 41.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 41.0f) { |
| 6571 | memorycxx . . $ Thief#memory.->bomb_handlecxx . . $ thief_data#bomb_handle. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "PTMCSeeker", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0, true, true); |
| 6572 | } |
| 6573 | |
| 6574 | if (anim_frame > 45.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 45.0f) { |
| 6575 | matrixcxx . . $ matrix# orient; |
| 6576 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 6577 | vectorcxx . . $ vector# velocity = orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 50.0f; |
| 6578 | |
| 6579 | Obj_UnattachFromParentcxx . . $ Obj_UnattachFromParent.(memorycxx . . $ Thief#memory.->bomb_handlecxx . . $ thief_data#bomb_handle.); |
| 6580 | |
| 6581 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Thief#memory.->bomb_handlecxx . . $ thief_data#bomb_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 6582 | |
| 6583 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6584 | } |
| 6585 | } break; |
| 6586 | case THIEF_SUB_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:1617:9`!: { |
| 6587 | } break; |
| 6588 | case THIEF_SUB_DROP_POWERUPcxx . . $ `scripts/AIGame.cpp:1618:9`!: { |
| 6589 | } break; |
| 6590 | default: { |
| 6591 | } break; |
| 6592 | } |
| 6593 | |
| 6594 | if (memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode. != THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`! && memorycxx . . $ Thief#memory.->sub_mode_timecxx . . $ thief_data#sub_mode_time. > 10.0) { |
| 6595 | SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(me, THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!); |
| 6596 | } |
| 6597 | } |
| 6598 | |
| 6599 | void Thiefcxx . . $ Thief#::SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(int me, int new_mode) { |
| 6600 | vectorcxx . . $ vector# pos; |
| 6601 | int room = 0; |
| 6602 | |
| 6603 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 6604 | |
| 6605 | // Makes sure that the dodge flag is set by default (certain modes turn it off) |
| 6606 | int flags = AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; // Don't dodge while surrendering |
| 6607 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6608 | |
| 6609 | switch (new_mode) { |
| 6610 | case THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!: { |
| 6611 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 2, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &pos, |
| 6612 | room); |
| 6613 | AI_SetGoalFlagscxx . . $ AI_SetGoalFlags.(me, 2, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!, false); |
| 6614 | } break; |
| 6615 | case THIEF_STEALcxx . . $ `scripts/AIGame.cpp:1603:9`!: { |
| 6616 | flags = AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; // Don't dodge while stealing |
| 6617 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6618 | |
| 6619 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 6620 | } break; |
| 6621 | case THIEF_DEATHcxx . . $ `scripts/AIGame.cpp:1608:9`!: { |
| 6622 | flags = AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; // Don't dodge while dying |
| 6623 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6624 | |
| 6625 | float temp = 0.0f; |
| 6626 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_TURN_RATEcxx . . $ `scripts/osiris_common.h:507:9`!, &temp); |
| 6627 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 85.0f, 140.0f, 8.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefDeath"), -1); |
| 6628 | } break; |
| 6629 | case THIEF_SURRENDERcxx . . $ `scripts/AIGame.cpp:1605:9`!: { |
| 6630 | flags = AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; // Don't dodge while surrendering |
| 6631 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6632 | |
| 6633 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, me); |
| 6634 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 64.0f, 71.0f, 1.0f, 0, -1, -1); |
| 6635 | } break; |
| 6636 | case THIEF_TRACK_PLAYERcxx . . $ `scripts/AIGame.cpp:1602:9`!: { |
| 6637 | } break; |
| 6638 | case THIEF_RUN_AWAYcxx . . $ `scripts/AIGame.cpp:1604:9`!: { |
| 6639 | } break; |
| 6640 | case THIEF_TIME_BOMBcxx . . $ `scripts/AIGame.cpp:1606:9`!: { |
| 6641 | } break; |
| 6642 | case THIEF_PLAYER_DEATH_TAUNTcxx . . $ `scripts/AIGame.cpp:1607:9`!: { |
| 6643 | } break; |
| 6644 | case THIEF_KIDNAP_GBcxx . . $ `scripts/AIGame.cpp:1609:9`!: { |
| 6645 | } break; |
| 6646 | case THIEF_CORNEREDcxx . . $ `scripts/AIGame.cpp:1610:9`!: { |
| 6647 | } break; |
| 6648 | } |
| 6649 | |
| 6650 | memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. = 0.0f; |
| 6651 | memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. = new_mode; |
| 6652 | } |
| 6653 | |
| 6654 | void Thiefcxx . . $ Thief#::DoInitcxx . . $ Thief#DoInit(d4f767463ce0a6b3).(int me) { |
| 6655 | |
| 6656 | int room; |
| 6657 | vectorcxx . . $ vector# pos; |
| 6658 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 6659 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 6660 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(thief_datacxx . . $ thief_data#); |
| 6661 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 6662 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 6663 | |
| 6664 | memorycxx . . $ Thief#memory. = (thief_datacxx . . $ thief_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 6665 | memorycxx . . $ Thief#memory.->next_test_timecxx . . $ thief_data#next_test_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f; |
| 6666 | memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. = 0; |
| 6667 | memorycxx . . $ Thief#memory.->last_summon_timecxx . . $ thief_data#last_summon_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 6668 | |
| 6669 | memorycxx . . $ Thief#memory.->num_stolen_objscxx . . $ thief_data#num_stolen_objs. = 0; |
| 6670 | memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons. = 0; |
| 6671 | memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv. = 0; |
| 6672 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &memorycxx . . $ Thief#memory.->last_shieldscxx . . $ thief_data#last_shields.); |
| 6673 | |
| 6674 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!); |
| 6675 | SetSubModecxx . . $ Thief#SetSubMode(3e454b8ccf442868).(me, THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!); |
| 6676 | } |
| 6677 | |
| 6678 | void Thiefcxx . . $ Thief#::DoCollidecxx . . $ Thief#DoCollide(bbb8461685d7aa69).(int me, tOSIRISEVTCOLLIDEcxx . . $ tOSIRISEVTCOLLIDE# *evt_collide) {} |
| 6679 | |
| 6680 | bool Thiefcxx . . $ Thief#::DoNotifycxx . . $ Thief#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 6681 | switch (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.) { |
| 6682 | case AIN_MELEE_HITcxx . . $ `Descent3/aistruct_external.h:308:9`!: { |
| 6683 | int target_handle; |
| 6684 | int target_type; |
| 6685 | |
| 6686 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 6687 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &target_type); |
| 6688 | |
| 6689 | if (target_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 6690 | bool f_success; |
| 6691 | |
| 6692 | f_success = DoStealcxx . . $ Thief#DoSteal(54454554f05f9a4a).(me, target_handle, 1, false); |
| 6693 | DoStealcxx . . $ Thief#DoSteal(54454554f05f9a4a).(me, target_handle, 2, f_success); |
| 6694 | } else if (target_type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 6695 | uint16_tcxx . . $ uint16_t# id; |
| 6696 | |
| 6697 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 6698 | if (id == ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`! || id == ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!) { |
| 6699 | DoKidnapcxx . . $ Thief#DoKidnap(3e454b8ccf442868).(me, target_handle); |
| 6700 | } else { |
| 6701 | DoAttackcxx . . $ Thief#DoAttack(3e454b8ccf442868).(me, target_handle); |
| 6702 | } |
| 6703 | } |
| 6704 | |
| 6705 | // If successful or dot to player greater than threshold then -- chrishack |
| 6706 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!); |
| 6707 | } break; |
| 6708 | case AIN_HIT_BY_WEAPONcxx . . $ `Descent3/aistruct_external.h:299:9`!: { |
| 6709 | if (memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. == THIEF_STEALcxx . . $ `scripts/AIGame.cpp:1603:9`!) { |
| 6710 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!); |
| 6711 | } |
| 6712 | } break; |
| 6713 | } |
| 6714 | |
| 6715 | return true; |
| 6716 | } |
| 6717 | |
| 6718 | void Thiefcxx . . $ Thief#::DoFramecxx . . $ Thief#DoFrame(d4f767463ce0a6b3).(int me) { |
| 6719 | // Drop bomb:29-50 (4.5 seconds, bomb created at 41 and leaves hand at frame 45) |
| 6720 | // Button push: 50-64 (3.5 seconds) button presses: 57,59 |
| 6721 | // surrender: 64-85 (2.5-3.0 seconds) |
| 6722 | // summon: 12-29 (3.0 seconds) 19-23 (summons) |
| 6723 | |
| 6724 | float anim_frame; |
| 6725 | float shields; |
| 6726 | int flags; |
| 6727 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &anim_frame); |
| 6728 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 6729 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 6730 | |
| 6731 | bool f_used; |
| 6732 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 6733 | if (f_used) { |
| 6734 | return; |
| 6735 | } |
| 6736 | |
| 6737 | msafe_structcxx . . $ msafe_struct# m; |
| 6738 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 6739 | |
| 6740 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_POScxx . . $ `scripts/osiris_common.h:820:9`!, &m); |
| 6741 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_ROOMNUMcxx . . $ `scripts/osiris_common.h:822:9`!, &m); |
| 6742 | |
| 6743 | if ((flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) && |
| 6744 | !((anim_frame >= 0.0f && anim_frame <= 6.0f) || (anim_frame >= 85.0f && anim_frame <= 140.0f))) { |
| 6745 | int room; |
| 6746 | vectorcxx . . $ vector# pos; |
| 6747 | int weapon_id; |
| 6748 | |
| 6749 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 6750 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 6751 | |
| 6752 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 6753 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 6754 | |
| 6755 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 6756 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 6757 | 0.0f, 0.0f); |
| 6758 | } |
| 6759 | |
| 6760 | if ((memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. != THIEF_DEATHcxx . . $ `scripts/AIGame.cpp:1608:9`!) && (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) && anim_frame >= 0.0f && anim_frame <= 6.0f) { |
| 6761 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_DEATHcxx . . $ `scripts/AIGame.cpp:1608:9`!); |
| 6762 | } |
| 6763 | |
| 6764 | if (memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. >= 50.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 64.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. < 57.0f && anim_frame >= 57.0f) { |
| 6765 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefButtonA")); |
| 6766 | } |
| 6767 | |
| 6768 | if (memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. >= 50.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 64.0f && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. < 59.0f && anim_frame >= 59.0f) { |
| 6769 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtThiefButtonB")); |
| 6770 | } |
| 6771 | |
| 6772 | if (memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. == THIEF_DEATHcxx . . $ `scripts/AIGame.cpp:1608:9`!) { |
| 6773 | if (anim_frame > 86 && memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. <= 86) { |
| 6774 | int room; |
| 6775 | vectorcxx . . $ vector# pos; |
| 6776 | int weapon_id; |
| 6777 | |
| 6778 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 6779 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 6780 | |
| 6781 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 6782 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 6783 | } |
| 6784 | |
| 6785 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. < 5.0f && memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 5.0f) { |
| 6786 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 6787 | } |
| 6788 | |
| 6789 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. > 8.0f) { |
| 6790 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 6791 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 6792 | 0.0f, 0.0f); |
| 6793 | } |
| 6794 | } else if (memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. == THIEF_SURRENDERcxx . . $ `scripts/AIGame.cpp:1605:9`!) { |
| 6795 | if (anim_frame >= 65.0 && anim_frame <= 71.0) { |
| 6796 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 71.0f, 79.0f, 1.0f, AIAF_LOOPINGcxx . . $ `Descent3/aistruct_external.h:115:9`!, -1, -1); |
| 6797 | } |
| 6798 | |
| 6799 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. < 2.2f && memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 2.2f) { |
| 6800 | SpewEverythingcxx . . $ Thief#SpewEverything(d4f767463ce0a6b3).(me); |
| 6801 | } |
| 6802 | |
| 6803 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. < 3.0f && memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 3.0f) { |
| 6804 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 79.0f, 85.0f, 1.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 6805 | } |
| 6806 | |
| 6807 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. > 3.0f && anim_frame >= 0 && anim_frame <= 6) { |
| 6808 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!); |
| 6809 | } |
| 6810 | } else if (memorycxx . . $ Thief#memory.->modecxx . . $ thief_data#mode. == THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!) { |
| 6811 | DoSubModeFramecxx . . $ Thief#DoSubModeFrame(d4f767463ce0a6b3).(me); |
| 6812 | |
| 6813 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. > 10.0f && memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode. == THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!) { |
| 6814 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_STEALcxx . . $ `scripts/AIGame.cpp:1603:9`!); |
| 6815 | } |
| 6816 | |
| 6817 | if (shields < 20.0f && memorycxx . . $ Thief#memory.->last_shieldscxx . . $ thief_data#last_shields. >= 20.0) { |
| 6818 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_SURRENDERcxx . . $ `scripts/AIGame.cpp:1605:9`!); |
| 6819 | } |
| 6820 | } else { |
| 6821 | if (memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. > 10.0 && memorycxx . . $ Thief#memory.->sub_modecxx . . $ thief_data#sub_mode. == THIEF_SUB_NONEcxx . . $ `scripts/AIGame.cpp:1613:9`!) { |
| 6822 | SetModecxx . . $ Thief#SetMode(3e454b8ccf442868).(me, THIEF_AMBIENTcxx . . $ `scripts/AIGame.cpp:1601:9`!); |
| 6823 | } |
| 6824 | } |
| 6825 | |
| 6826 | // Update the last frame |
| 6827 | memorycxx . . $ Thief#memory.->mode_timecxx . . $ thief_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6828 | memorycxx . . $ Thief#memory.->sub_mode_timecxx . . $ thief_data#sub_mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 6829 | |
| 6830 | memorycxx . . $ Thief#memory.->last_framecxx . . $ thief_data#last_frame. = anim_frame; |
| 6831 | memorycxx . . $ Thief#memory.->last_shieldscxx . . $ thief_data#last_shields. = shields; |
| 6832 | } |
| 6833 | |
| 6834 | void Thiefcxx . . $ Thief#::SpewEverythingcxx . . $ Thief#SpewEverything(d4f767463ce0a6b3).(int me) { |
| 6835 | int i; |
| 6836 | int powerup_handle; |
| 6837 | int room; |
| 6838 | vectorcxx . . $ vector# pos; |
| 6839 | |
| 6840 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 6841 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 6842 | |
| 6843 | for (i = 0; i < memorycxx . . $ Thief#memory.->num_stolen_weaponscxx . . $ thief_data#num_stolen_weapons.; i++) { |
| 6844 | uint16_tcxx . . $ uint16_t# id; |
| 6845 | int j; |
| 6846 | |
| 6847 | for (j = 0; j < memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[i].amountcxx . . $ weapon_item#amount.; j++) { |
| 6848 | float speed = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 20.0f + 5.0f; |
| 6849 | vectorcxx . . $ vector# dir; |
| 6850 | |
| 6851 | dir.xcxx . . $ vector#x. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6852 | dir.ycxx . . $ vector#y. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6853 | dir.zcxx . . $ vector#z. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6854 | |
| 6855 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir); |
| 6856 | dir *=cxx . . $ `operator*=`(f132838b2cd11d6). speed; |
| 6857 | |
| 6858 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[i].ownercxx . . $ weapon_item#owner., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_US_WEAPON_POWERUP_IDcxx . . $ `scripts/osiris_common.h:469:9`!, &id, |
| 6859 | memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[i].indexcxx . . $ weapon_item#index.); |
| 6860 | powerup_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &dir); |
| 6861 | } |
| 6862 | |
| 6863 | memorycxx . . $ Thief#memory.->stolen_weaponscxx . . $ thief_data#stolen_weapons.[i].amountcxx . . $ weapon_item#amount. = 0; |
| 6864 | } |
| 6865 | |
| 6866 | for (i = 0; i < memorycxx . . $ Thief#memory.->num_stolen_objscxx . . $ thief_data#num_stolen_objs.; i++) { |
| 6867 | } |
| 6868 | memorycxx . . $ Thief#memory.->num_stolen_objscxx . . $ thief_data#num_stolen_objs. = 0; |
| 6869 | |
| 6870 | for (i = 0; i < memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv.; i++) { |
| 6871 | static int am_id = -2, hl_id = -2, etos_id = -2, cl_id = -2, iv_id = -2, rf_id = -2, qf_id = -2; |
| 6872 | int id; |
| 6873 | |
| 6874 | switch (memorycxx . . $ Thief#memory.->stolen_invcxx . . $ thief_data#stolen_inv.[i].idcxx . . $ inv_item#id.) { |
| 6875 | case THIEFITEM_AUTOMAPcxx . . $ `scripts/osiris_common.h:772:9`!: |
| 6876 | if (am_id == -2) |
| 6877 | am_id = Obj_FindIDcxx . . $ Obj_FindID.("ThiefAutoMap"); |
| 6878 | id = am_id; |
| 6879 | break; |
| 6880 | case THIEFITEM_HEADLIGHTcxx . . $ `scripts/osiris_common.h:773:9`!: |
| 6881 | if (hl_id == -2) |
| 6882 | hl_id = Obj_FindIDcxx . . $ Obj_FindID.("HeadlightPowerup"); |
| 6883 | id = hl_id; |
| 6884 | break; |
| 6885 | case THIEFITEM_ETOSCONVcxx . . $ `scripts/osiris_common.h:774:9`!: |
| 6886 | if (etos_id == -2) |
| 6887 | etos_id = Obj_FindIDcxx . . $ Obj_FindID.("Converter"); |
| 6888 | id = etos_id; |
| 6889 | break; |
| 6890 | case THIEFITEM_CLOAKcxx . . $ `scripts/osiris_common.h:775:9`!: |
| 6891 | if (cl_id == -2) |
| 6892 | cl_id = Obj_FindIDcxx . . $ Obj_FindID.("Cloak"); |
| 6893 | id = cl_id; |
| 6894 | break; |
| 6895 | case THIEFITEM_INVULNcxx . . $ `scripts/osiris_common.h:776:9`!: |
| 6896 | if (iv_id == -2) |
| 6897 | iv_id = Obj_FindIDcxx . . $ Obj_FindID.("Invulnerability"); |
| 6898 | id = iv_id; |
| 6899 | break; |
| 6900 | case THIEFITEM_RAPIDFIREcxx . . $ `scripts/osiris_common.h:777:9`!: |
| 6901 | if (rf_id == -2) |
| 6902 | rf_id = Obj_FindIDcxx . . $ Obj_FindID.("Rapidfire"); |
| 6903 | id = rf_id; |
| 6904 | break; |
| 6905 | case THIEFITEM_QUADFIREcxx . . $ `scripts/osiris_common.h:778:9`!: |
| 6906 | if (qf_id == -2) |
| 6907 | qf_id = Obj_FindIDcxx . . $ Obj_FindID.("QuadLaser"); |
| 6908 | id = qf_id; |
| 6909 | break; |
| 6910 | default: |
| 6911 | id = -1; |
| 6912 | break; |
| 6913 | } |
| 6914 | |
| 6915 | if (id > -1) { |
| 6916 | float speed = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 20.0f + 5.0f; |
| 6917 | vectorcxx . . $ vector# dir; |
| 6918 | |
| 6919 | dir.xcxx . . $ vector#x. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6920 | dir.ycxx . . $ vector#y. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6921 | dir.zcxx . . $ vector#z. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 6922 | |
| 6923 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir); |
| 6924 | dir *=cxx . . $ `operator*=`(f132838b2cd11d6). speed; |
| 6925 | |
| 6926 | powerup_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &dir); |
| 6927 | } |
| 6928 | } |
| 6929 | memorycxx . . $ Thief#memory.->num_stolen_invcxx . . $ thief_data#num_stolen_inv. = 0; |
| 6930 | } |
| 6931 | |
| 6932 | void Thiefcxx . . $ Thief#::DoDestroycxx . . $ Thief#DoDestroy(2e83fcfe4732ba14).(int me, tOSIRISEVTDESTROYcxx . . $ tOSIRISEVTDESTROY# *evt_destroy) { SpewEverythingcxx . . $ Thief#SpewEverything(d4f767463ce0a6b3).(me); } |
| 6933 | |
| 6934 | int16_t Thiefcxx . . $ Thief#::CallEventcxx . . $ Thief#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 6935 | switch (event) { |
| 6936 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 6937 | DoInitcxx . . $ Thief#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 6938 | break; |
| 6939 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 6940 | DoFramecxx . . $ Thief#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 6941 | break; |
| 6942 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 6943 | DoCollidecxx . . $ Thief#DoCollide(bbb8461685d7aa69).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide.); |
| 6944 | break; |
| 6945 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 6946 | return (DoNotifycxx . . $ Thief#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 6947 | break; |
| 6948 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 6949 | DoDestroycxx . . $ Thief#DoDestroy(2e83fcfe4732ba14).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_destroycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_destroy.); |
| 6950 | break; |
| 6951 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 6952 | memorycxx . . $ Thief#memory. = (thief_datacxx . . $ thief_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 6953 | } break; |
| 6954 | } |
| 6955 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 6956 | } |
| 6957 | |
| 6958 | //--------------- |
| 6959 | // Super Thief |
| 6960 | //--------------- |
| 6961 | |
| 6962 | //--------------- |
| 6963 | // Sickle |
| 6964 | //--------------- |
| 6965 | |
| 6966 | void Sicklecxx . . $ Sickle#::SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 6967 | if (mode == memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode.) |
| 6968 | return; |
| 6969 | |
| 6970 | float fov = -1.0f; |
| 6971 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_FOVcxx . . $ `scripts/osiris_common.h:537:9`!, &fov); |
| 6972 | |
| 6973 | mprintfcxx . . $ mprintf.(0, "Set mode %d\n", (int)mode); |
| 6974 | memorycxx . . $ Sickle#memory.->done_movingcxx . . $ sickle_data#done_moving. = false; |
| 6975 | memorycxx . . $ Sickle#memory.->done_turningcxx . . $ sickle_data#done_turning. = false; |
| 6976 | |
| 6977 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 6978 | |
| 6979 | switch (mode) { |
| 6980 | case SICKLE_GOING_HOMEcxx . . $ `scripts/AIGame.cpp:1165:9`!: { |
| 6981 | int flags; |
| 6982 | |
| 6983 | // Turn off friend avoidance |
| 6984 | flags = AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!; |
| 6985 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 6986 | |
| 6987 | // Orient to vel |
| 6988 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 2, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &memorycxx . . $ Sickle#memory.->home_poscxx . . $ sickle_data#home_pos., memorycxx . . $ Sickle#memory.->home_roomcxx . . $ sickle_data#home_room.); |
| 6989 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 2, 8.0f); |
| 6990 | } break; |
| 6991 | case SICKLE_LAND_ON_CEILINGcxx . . $ `scripts/AIGame.cpp:1166:9`!: { |
| 6992 | ray_infocxx . . $ ray_info# ray; |
| 6993 | int flags; |
| 6994 | int fate; |
| 6995 | |
| 6996 | int start_room; |
| 6997 | vectorcxx . . $ vector# start_pos; |
| 6998 | vectorcxx . . $ vector# end_pos; |
| 6999 | |
| 7000 | int ceiling_room; |
| 7001 | // mprintf(0, "In mode 5\n"); |
| 7002 | |
| 7003 | // Turn off auto-level |
| 7004 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 7005 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7006 | |
| 7007 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &start_pos); |
| 7008 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &start_room); |
| 7009 | end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). start_pos; |
| 7010 | end_pos.ycxx . . $ vector#y. = end_pos.ycxx . . $ vector#y. + 400.0; |
| 7011 | flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 7012 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 7013 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); |
| 7014 | |
| 7015 | memorycxx . . $ Sickle#memory.->ceiling_poscxx . . $ sickle_data#ceiling_pos. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). ray.hit_pointcxx . . $ ray_info#hit_point.; |
| 7016 | memorycxx . . $ Sickle#memory.->ceiling_poscxx . . $ sickle_data#ceiling_pos..ycxx . . $ vector#y. -= 3.2f; |
| 7017 | |
| 7018 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &start_pos, &memorycxx . . $ Sickle#memory.->ceiling_poscxx . . $ sickle_data#ceiling_pos., start_room, 0.0f, flags, &ray); |
| 7019 | ceiling_room = ray.hit_roomcxx . . $ ray_info#hit_room.; |
| 7020 | |
| 7021 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 2, 1.0f, -1, /*GF_NONFLUSHABLE | GF_KEEP_AT_COMPLETION |*/ GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`!, |
| 7022 | &memorycxx . . $ Sickle#memory.->ceiling_poscxx . . $ sickle_data#ceiling_pos., ceiling_room); |
| 7023 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 2, 0.0f); |
| 7024 | |
| 7025 | // Turn on point-collide-walls |
| 7026 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 7027 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7028 | |
| 7029 | flags = PF_LOCK_MASKcxx . . $ `Descent3/object_external.h:344:9`!; |
| 7030 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7031 | } break; |
| 7032 | case SICKLE_LANDEDcxx . . $ `scripts/AIGame.cpp:1167:9`!: { |
| 7033 | int flags; |
| 7034 | char movement_type; |
| 7035 | |
| 7036 | // Stop on ceiling |
| 7037 | flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_PERSISTANTcxx . . $ `Descent3/aistruct_external.h:354:9`!; |
| 7038 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 7039 | |
| 7040 | float awareness = AWARE_BARELYcxx . . $ `Descent3/aistruct_external.h:326:9`!; |
| 7041 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 7042 | |
| 7043 | float sleep_fov = 1.0f; |
| 7044 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_FOVcxx . . $ `scripts/osiris_common.h:537:9`!, &sleep_fov); |
| 7045 | |
| 7046 | movement_type = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 7047 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &movement_type); |
| 7048 | } break; |
| 7049 | case SICKLE_MELEEcxx . . $ `scripts/AIGame.cpp:1168:9`!: { |
| 7050 | int flags; |
| 7051 | vectorcxx . . $ vector# vel; |
| 7052 | char movement_type; |
| 7053 | |
| 7054 | if (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_LANDEDcxx . . $ `scripts/AIGame.cpp:1167:9`!) { |
| 7055 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 7056 | vel.ycxx . . $ vector#y. -= (8.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 15.0f); |
| 7057 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 7058 | } |
| 7059 | |
| 7060 | // Melee Mode |
| 7061 | flags = PF_LOCK_MASKcxx . . $ `Descent3/object_external.h:344:9`! | PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 7062 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7063 | |
| 7064 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 7065 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7066 | |
| 7067 | flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`! | AIF_PERSISTANTcxx . . $ `Descent3/aistruct_external.h:354:9`!; |
| 7068 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 7069 | |
| 7070 | movement_type = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 7071 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &movement_type); |
| 7072 | |
| 7073 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 7074 | } break; |
| 7075 | default: |
| 7076 | mprintfcxx . . $ mprintf.(0, "Sickle is all messed up!\n"); |
| 7077 | } |
| 7078 | |
| 7079 | memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. = mode; |
| 7080 | memorycxx . . $ Sickle#memory.->mode_timecxx . . $ sickle_data#mode_time. = 0.0f; |
| 7081 | } |
| 7082 | |
| 7083 | void Sicklecxx . . $ Sickle#::DoInitcxx . . $ Sickle#DoInit(d4f767463ce0a6b3).(int me) { |
| 7084 | int flags; |
| 7085 | msafe_structcxx . . $ msafe_struct# m; |
| 7086 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 7087 | |
| 7088 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7089 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7090 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(sickle_datacxx . . $ sickle_data#); |
| 7091 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7092 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7093 | |
| 7094 | memorycxx . . $ Sickle#memory. = (sickle_datacxx . . $ sickle_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7095 | |
| 7096 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 7097 | flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`! | AIF_PERSISTANTcxx . . $ `Descent3/aistruct_external.h:354:9`!; |
| 7098 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 7099 | |
| 7100 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &memorycxx . . $ Sickle#memory.->home_poscxx . . $ sickle_data#home_pos.); |
| 7101 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &memorycxx . . $ Sickle#memory.->home_roomcxx . . $ sickle_data#home_room.); |
| 7102 | memorycxx . . $ Sickle#memory.->done_turningcxx . . $ sickle_data#done_turning. = false; |
| 7103 | memorycxx . . $ Sickle#memory.->done_movingcxx . . $ sickle_data#done_moving. = false; |
| 7104 | |
| 7105 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 7106 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7107 | |
| 7108 | flags = PF_POINT_COLLIDE_WALLScxx . . $ `Descent3/object_external.h:333:9`!; |
| 7109 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7110 | |
| 7111 | matrixcxx . . $ matrix# orient; |
| 7112 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 7113 | memorycxx . . $ Sickle#memory.->home_fveccxx . . $ sickle_data#home_fvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.fveccxx . . $ matrix#fvec.; |
| 7114 | memorycxx . . $ Sickle#memory.->home_fveccxx . . $ sickle_data#home_fvec..ycxx . . $ vector#y. = 0.0f; |
| 7115 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&memorycxx . . $ Sickle#memory.->home_fveccxx . . $ sickle_data#home_fvec.); |
| 7116 | |
| 7117 | memorycxx . . $ Sickle#memory.->mode_timecxx . . $ sickle_data#mode_time. = 0.0f; |
| 7118 | |
| 7119 | SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(me, SICKLE_MELEEcxx . . $ `scripts/AIGame.cpp:1168:9`!); |
| 7120 | } |
| 7121 | |
| 7122 | void Sicklecxx . . $ Sickle#::DoFramecxx . . $ Sickle#DoFrame(d4f767463ce0a6b3).(int me) { |
| 7123 | vectorcxx . . $ vector# uvec; |
| 7124 | vectorcxx . . $ vector# start_pos; |
| 7125 | vectorcxx . . $ vector# end_pos; |
| 7126 | int flags; |
| 7127 | int fate; |
| 7128 | int start_room; |
| 7129 | int ceiling_room; |
| 7130 | float anim_frame; |
| 7131 | int new_mode; |
| 7132 | vectorcxx . . $ vector# vel; |
| 7133 | float last_see_time; |
| 7134 | float last_hear_time; |
| 7135 | char movement_type; |
| 7136 | |
| 7137 | float temp_time; |
| 7138 | float temp_time2; |
| 7139 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &temp_time); |
| 7140 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &temp_time2); |
| 7141 | |
| 7142 | last_hear_time = Game_GetTimecxx . . $ Game_GetTime.() - temp_time2; |
| 7143 | last_see_time = Game_GetTimecxx . . $ Game_GetTime.() - temp_time; |
| 7144 | |
| 7145 | if (last_hear_time < last_see_time || memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_LANDEDcxx . . $ `scripts/AIGame.cpp:1167:9`!) { |
| 7146 | last_see_time = last_hear_time; |
| 7147 | } |
| 7148 | |
| 7149 | memorycxx . . $ Sickle#memory.->mode_timecxx . . $ sickle_data#mode_time. += Game_GetTimecxx . . $ Game_GetTime.(); |
| 7150 | |
| 7151 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &anim_frame); |
| 7152 | |
| 7153 | new_mode = memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode.; |
| 7154 | |
| 7155 | if ((anim_frame >= 50 && anim_frame <= 55) || (last_see_time > 7.0)) { |
| 7156 | if (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_MELEEcxx . . $ `scripts/AIGame.cpp:1168:9`!) { |
| 7157 | new_mode = SICKLE_GOING_HOMEcxx . . $ `scripts/AIGame.cpp:1165:9`!; |
| 7158 | } |
| 7159 | } else { |
| 7160 | new_mode = SICKLE_MELEEcxx . . $ `scripts/AIGame.cpp:1168:9`!; |
| 7161 | } |
| 7162 | |
| 7163 | if (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. != new_mode) { |
| 7164 | SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(me, new_mode); |
| 7165 | } |
| 7166 | |
| 7167 | if (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_GOING_HOMEcxx . . $ `scripts/AIGame.cpp:1165:9`!) { |
| 7168 | mprintfcxx . . $ mprintf.(0, "Sickle going home\n"); |
| 7169 | |
| 7170 | if (memorycxx . . $ Sickle#memory.->done_movingcxx . . $ sickle_data#done_moving. == true) { |
| 7171 | SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(me, SICKLE_LAND_ON_CEILINGcxx . . $ `scripts/AIGame.cpp:1166:9`!); |
| 7172 | } |
| 7173 | } else if (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_LAND_ON_CEILINGcxx . . $ `scripts/AIGame.cpp:1166:9`!) { |
| 7174 | uvec.xcxx . . $ vector#x. = 0.0; |
| 7175 | uvec.ycxx . . $ vector#y. = -1.0; |
| 7176 | uvec.zcxx . . $ vector#z. = 0.0; |
| 7177 | |
| 7178 | memorycxx . . $ Sickle#memory.->done_turningcxx . . $ sickle_data#done_turning. = AI_TurnTowardsVectorscxx . . $ AI_TurnTowardsVectors.(me, &memorycxx . . $ Sickle#memory.->home_fveccxx . . $ sickle_data#home_fvec., &uvec) != 0; |
| 7179 | |
| 7180 | // mprintf(0, "Sickle Land on Ceiling %d, %d\n", memory->done_moving?1:0, memory->done_turning?1:0); |
| 7181 | vectorcxx . . $ vector# pos; |
| 7182 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 7183 | bool f_used; |
| 7184 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &f_used); |
| 7185 | |
| 7186 | mprintfcxx . . $ mprintf.(0, "%d Sickle Land on Ceiling %f away\n", f_used ? 1 : 0, vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&memorycxx . . $ Sickle#memory.->ceiling_poscxx . . $ sickle_data#ceiling_pos., &pos)); |
| 7187 | |
| 7188 | // mprintf(0, "In mode 10\n"); |
| 7189 | int flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 7190 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, OBJV_I_PHYSICS_FLAGScxx . . $ `scripts/osiris_common.h:641:9`!, &flags); |
| 7191 | |
| 7192 | if (memorycxx . . $ Sickle#memory.->done_turningcxx . . $ sickle_data#done_turning. == true && memorycxx . . $ Sickle#memory.->done_movingcxx . . $ sickle_data#done_moving. == true) { |
| 7193 | SetModecxx . . $ Sickle#SetMode(5016a63d0a5aceb0).(me, SICKLE_LANDEDcxx . . $ `scripts/AIGame.cpp:1167:9`!); |
| 7194 | } |
| 7195 | } |
| 7196 | } |
| 7197 | |
| 7198 | bool Sicklecxx . . $ Sickle#::DoNotifycxx . . $ Sickle#DoNotify(4ce66e6d2248ca63).(int me_handle, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 7199 | if ((IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.)) && |
| 7200 | (memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_GOING_HOMEcxx . . $ `scripts/AIGame.cpp:1165:9`! || memorycxx . . $ Sickle#memory.->modecxx . . $ sickle_data#mode. == SICKLE_LAND_ON_CEILINGcxx . . $ `scripts/AIGame.cpp:1166:9`!) && (notify->goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 2)) { |
| 7201 | |
| 7202 | memorycxx . . $ Sickle#memory.->done_movingcxx . . $ sickle_data#done_moving. = true; |
| 7203 | } |
| 7204 | |
| 7205 | return true; |
| 7206 | } |
| 7207 | |
| 7208 | int16_t Sicklecxx . . $ Sickle#::CallEventcxx . . $ Sickle#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7209 | switch (event) { |
| 7210 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 7211 | DoInitcxx . . $ Sickle#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7212 | break; |
| 7213 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 7214 | DoFramecxx . . $ Sickle#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7215 | break; |
| 7216 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 7217 | return (DoNotifycxx . . $ Sickle#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 7218 | break; |
| 7219 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 7220 | break; |
| 7221 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 7222 | memorycxx . . $ Sickle#memory. = (sickle_datacxx . . $ sickle_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 7223 | } break; |
| 7224 | } |
| 7225 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 7226 | } |
| 7227 | |
| 7228 | //--------------- |
| 7229 | // FireAtDist |
| 7230 | //--------------- |
| 7231 | |
| 7232 | void FireAtDistcxx . . $ FireAtDist#::DoInitcxx . . $ FireAtDist#DoInit(d4f767463ce0a6b3).(int me) { |
| 7233 | msafe_structcxx . . $ msafe_struct# m; |
| 7234 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 7235 | |
| 7236 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7237 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7238 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(fireatdist_datacxx . . $ fireatdist_data#); |
| 7239 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7240 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7241 | |
| 7242 | memorycxx . . $ FireAtDist#memory. = (fireatdist_datacxx . . $ fireatdist_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7243 | |
| 7244 | memorycxx . . $ FireAtDist#memory.->last_test_timecxx . . $ fireatdist_data#last_test_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 7245 | memorycxx . . $ FireAtDist#memory.->last_f_firecxx . . $ fireatdist_data#last_f_fire. = false; |
| 7246 | memorycxx . . $ FireAtDist#memory.->mecxx . . $ fireatdist_data#me. = me; |
| 7247 | |
| 7248 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &memorycxx . . $ FireAtDist#memory.->fire_distcxx . . $ fireatdist_data#fire_dist.); |
| 7249 | } |
| 7250 | |
| 7251 | void FireAtDistcxx . . $ FireAtDist#::DoFramecxx . . $ FireAtDist#DoFrame(d4f767463ce0a6b3).(int me) { |
| 7252 | if (memorycxx . . $ FireAtDist#memory.->last_test_timecxx . . $ fireatdist_data#last_test_time. + 3.0f < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 7253 | vectorcxx . . $ vector# pos; |
| 7254 | int room; |
| 7255 | int scan_objs[200]; |
| 7256 | int n_scan; |
| 7257 | int i; |
| 7258 | |
| 7259 | float dist; |
| 7260 | |
| 7261 | memorycxx . . $ FireAtDist#memory.->last_test_timecxx . . $ fireatdist_data#last_test_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 7262 | |
| 7263 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ FireAtDist#memory.->mecxx . . $ fireatdist_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 7264 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ FireAtDist#memory.->mecxx . . $ fireatdist_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7265 | |
| 7266 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ FireAtDist#memory.->mecxx . . $ fireatdist_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &dist); |
| 7267 | |
| 7268 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, dist, scan_objs, 200, false, true, false, true); |
| 7269 | |
| 7270 | memorycxx . . $ FireAtDist#memory.->last_f_firecxx . . $ fireatdist_data#last_f_fire. = false; |
| 7271 | |
| 7272 | for (i = 0; i < n_scan; i++) { |
| 7273 | int type; |
| 7274 | |
| 7275 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 7276 | |
| 7277 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 7278 | vectorcxx . . $ vector# p_pos; |
| 7279 | float cur_dist; |
| 7280 | |
| 7281 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &p_pos); |
| 7282 | |
| 7283 | cur_dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&pos, &p_pos); |
| 7284 | |
| 7285 | if (cur_dist <= memorycxx . . $ FireAtDist#memory.->fire_distcxx . . $ fireatdist_data#fire_dist.) { |
| 7286 | memorycxx . . $ FireAtDist#memory.->last_f_firecxx . . $ fireatdist_data#last_f_fire. = true; |
| 7287 | break; |
| 7288 | } |
| 7289 | } |
| 7290 | } |
| 7291 | } |
| 7292 | |
| 7293 | int flags = AISR_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:399:9`!; |
| 7294 | if (memorycxx . . $ FireAtDist#memory.->last_f_firecxx . . $ fireatdist_data#last_f_fire. != false) { |
| 7295 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:557:9`!, &flags); |
| 7296 | } else { |
| 7297 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:557:9`!, &flags); |
| 7298 | } |
| 7299 | } |
| 7300 | |
| 7301 | int16_t FireAtDistcxx . . $ FireAtDist#::CallEventcxx . . $ FireAtDist#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7302 | switch (event) { |
| 7303 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 7304 | DoInitcxx . . $ FireAtDist#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7305 | break; |
| 7306 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 7307 | DoFramecxx . . $ FireAtDist#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7308 | break; |
| 7309 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 7310 | break; |
| 7311 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 7312 | memorycxx . . $ FireAtDist#memory. = (fireatdist_datacxx . . $ fireatdist_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 7313 | } break; |
| 7314 | } |
| 7315 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 7316 | } |
| 7317 | |
| 7318 | //--------------- |
| 7319 | // HatePTMC |
| 7320 | //--------------- |
| 7321 | |
| 7322 | void HatePTMCcxx . . $ HatePTMC#::DoInitcxx . . $ HatePTMC#DoInit(d4f767463ce0a6b3).(int me) { |
| 7323 | msafe_structcxx . . $ msafe_struct# m; |
| 7324 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 7325 | |
| 7326 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7327 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7328 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(hateptmc_datacxx . . $ hateptmc_data#); |
| 7329 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7330 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7331 | |
| 7332 | memorycxx . . $ HatePTMC#memory. = (hateptmc_datacxx . . $ hateptmc_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7333 | |
| 7334 | memorycxx . . $ HatePTMC#memory.->time_till_pulsecxx . . $ hateptmc_data#time_till_pulse. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 7335 | memorycxx . . $ HatePTMC#memory.->mecxx . . $ hateptmc_data#me. = me; |
| 7336 | } |
| 7337 | |
| 7338 | void HatePTMCcxx . . $ HatePTMC#::DoFramecxx . . $ HatePTMC#DoFrame(d4f767463ce0a6b3).(int me) { |
| 7339 | int flags = AIF_TEAM_PTMCcxx . . $ `Descent3/aistruct_external.h:365:9`!; |
| 7340 | |
| 7341 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 7342 | |
| 7343 | if ((flags & AIF_TEAM_MASKcxx . . $ `Descent3/aistruct_external.h:364:9`!) == AIF_TEAM_REBELcxx . . $ `Descent3/aistruct_external.h:366:9`!) { |
| 7344 | memorycxx . . $ HatePTMC#memory.->time_till_pulsecxx . . $ hateptmc_data#time_till_pulse. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 7345 | |
| 7346 | if (memorycxx . . $ HatePTMC#memory.->time_till_pulsecxx . . $ hateptmc_data#time_till_pulse. <= 0.0f) { |
| 7347 | memorycxx . . $ HatePTMC#memory.->time_till_pulsecxx . . $ hateptmc_data#time_till_pulse. = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 7348 | |
| 7349 | vectorcxx . . $ vector# pos; |
| 7350 | int room; |
| 7351 | int scan_objs[50]; |
| 7352 | int n_scan; |
| 7353 | int i; |
| 7354 | |
| 7355 | float dist = 200.0f; |
| 7356 | |
| 7357 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ HatePTMC#memory.->mecxx . . $ hateptmc_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 7358 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ HatePTMC#memory.->mecxx . . $ hateptmc_data#me., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7359 | |
| 7360 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, dist, scan_objs, 50, false, true, false, true); |
| 7361 | |
| 7362 | for (i = 0; i < n_scan; i++) { |
| 7363 | char ctype; |
| 7364 | int num_wbs; |
| 7365 | |
| 7366 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_C_CONTROL_TYPEcxx . . $ `scripts/osiris_common.h:637:9`!, &ctype); |
| 7367 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(scan_objs[i], 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBV_C_NUM_WBScxx . . $ `scripts/osiris_common.h:678:9`!, &num_wbs); |
| 7368 | |
| 7369 | if (num_wbs > 0 && ctype == CT_AIcxx . . $ `Descent3/object_external.h:217:9`!) { |
| 7370 | int flags; |
| 7371 | int target; |
| 7372 | float last_see_target_time; |
| 7373 | int t_type = OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!; |
| 7374 | |
| 7375 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 7376 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target); |
| 7377 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_target_time); |
| 7378 | |
| 7379 | if (target != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 7380 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &t_type); |
| 7381 | } |
| 7382 | |
| 7383 | // If it is a PTMC bot |
| 7384 | if (((flags & AIF_TEAM_MASKcxx . . $ `Descent3/aistruct_external.h:364:9`!) == AIF_TEAM_PTMCcxx . . $ `Descent3/aistruct_external.h:365:9`!) && |
| 7385 | !(t_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && Game_GetTimecxx . . $ Game_GetTime.() - last_see_target_time < 7.0f)) { |
| 7386 | float fov; |
| 7387 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_FOVcxx . . $ `scripts/osiris_common.h:537:9`!, &fov); |
| 7388 | |
| 7389 | vectorcxx . . $ vector# p_pos; |
| 7390 | int p_room; |
| 7391 | matrixcxx . . $ matrix# orient; |
| 7392 | |
| 7393 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &p_pos); |
| 7394 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &p_room); |
| 7395 | |
| 7396 | vectorcxx . . $ vector# dir = p_pos -cxx . . $ operator-(b77b703cd1e43e33). pos; |
| 7397 | float dist = vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir); |
| 7398 | |
| 7399 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 7400 | |
| 7401 | if (p_room == room || dist < 60.0f || orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(4a721543d64e126a). dir >= fov) { |
| 7402 | ray_infocxx . . $ ray_info# ray; |
| 7403 | int flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`! | FQ_IGNORE_MOVING_OBJECTScxx . . $ `lib/findintersection_external.h:67:9`! | |
| 7404 | FQ_IGNORE_NON_LIGHTMAP_OBJECTScxx . . $ `lib/findintersection_external.h:68:9`!; |
| 7405 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &pos, &p_pos, room, 0.0f, flags, &ray); |
| 7406 | |
| 7407 | if (fate == HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 7408 | float awareness; |
| 7409 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 7410 | if (awareness < AWARE_MOSTLYcxx . . $ `Descent3/aistruct_external.h:324:9`!) { |
| 7411 | awareness = AWARE_MOSTLYcxx . . $ `Descent3/aistruct_external.h:324:9`!; |
| 7412 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 7413 | } |
| 7414 | AI_Valuecxx . . $ AI_Value.(scan_objs[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &me); |
| 7415 | } |
| 7416 | } |
| 7417 | } |
| 7418 | } |
| 7419 | } |
| 7420 | } |
| 7421 | } |
| 7422 | } |
| 7423 | |
| 7424 | int16_t HatePTMCcxx . . $ HatePTMC#::CallEventcxx . . $ HatePTMC#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7425 | switch (event) { |
| 7426 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 7427 | DoInitcxx . . $ HatePTMC#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7428 | break; |
| 7429 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: |
| 7430 | DoFramecxx . . $ HatePTMC#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7431 | break; |
| 7432 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 7433 | break; |
| 7434 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 7435 | memorycxx . . $ HatePTMC#memory. = (hateptmc_datacxx . . $ hateptmc_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 7436 | } break; |
| 7437 | } |
| 7438 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 7439 | } |
| 7440 | |
| 7441 | //--------------- |
| 7442 | // Tubbs |
| 7443 | //--------------- |
| 7444 | |
| 7445 | void Tubbscxx . . $ Tubbs#::DoInitcxx . . $ Tubbs#DoInit(d4f767463ce0a6b3).(int me) { |
| 7446 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7447 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7448 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tubbs_datacxx . . $ tubbs_data#); |
| 7449 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7450 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7451 | |
| 7452 | memorycxx . . $ Tubbs#memory. = (tubbs_datacxx . . $ tubbs_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7453 | |
| 7454 | int diff = Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 7455 | |
| 7456 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed.); |
| 7457 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc.); |
| 7458 | |
| 7459 | switch (diff) { |
| 7460 | case DIFFICULTY_TRAINEEcxx . . $ `Descent3/difficulty_external.h:25:9`!: |
| 7461 | memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. = memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed. * 1.2f; |
| 7462 | memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. = memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc. * 1.1f; |
| 7463 | memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time. = 22.0f; |
| 7464 | break; |
| 7465 | case DIFFICULTY_ROOKIEcxx . . $ `Descent3/difficulty_external.h:26:9`!: |
| 7466 | memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. = memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed. * 1.3f; |
| 7467 | memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. = memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc. * 1.5f; |
| 7468 | memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time. = 20.0f; |
| 7469 | break; |
| 7470 | case DIFFICULTY_HOTSHOTcxx . . $ `Descent3/difficulty_external.h:27:9`!: |
| 7471 | memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. = memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed. * 1.7f; |
| 7472 | memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. = memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc. * 2.5f; |
| 7473 | memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time. = 18.0f; |
| 7474 | break; |
| 7475 | case DIFFICULTY_ACEcxx . . $ `Descent3/difficulty_external.h:28:9`!: |
| 7476 | memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. = memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed. * 1.75f; |
| 7477 | memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. = memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc. * 2.8f; |
| 7478 | memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time. = 15.0f; |
| 7479 | break; |
| 7480 | case DIFFICULTY_INSANEcxx . . $ `Descent3/difficulty_external.h:29:9`!: |
| 7481 | memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. = memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed. * 1.8f; |
| 7482 | memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. = memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc. * 3.0f; |
| 7483 | memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time. = 12.0f; |
| 7484 | break; |
| 7485 | } |
| 7486 | } |
| 7487 | |
| 7488 | void Tubbscxx . . $ Tubbs#::DoFramecxx . . $ Tubbs#DoFrame(d4f767463ce0a6b3).(int me) { |
| 7489 | float see_time; |
| 7490 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &see_time); |
| 7491 | |
| 7492 | bool used; |
| 7493 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 7494 | |
| 7495 | if (see_time + 4.0f > Game_GetTimecxx . . $ Game_GetTime.() && !used) { |
| 7496 | float speed; |
| 7497 | float acc; |
| 7498 | float ft; |
| 7499 | |
| 7500 | ft = Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 7501 | |
| 7502 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 7503 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 7504 | |
| 7505 | speed += (memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed. - memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed.) * (ft / memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time.); |
| 7506 | acc += (memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc. - memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc.) * (ft / memorycxx . . $ Tubbs#memory.->full_anger_timecxx . . $ tubbs_data#full_anger_time.); |
| 7507 | |
| 7508 | if (speed > memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed.) |
| 7509 | speed = memorycxx . . $ Tubbs#memory.->max_speedcxx . . $ tubbs_data#max_speed.; |
| 7510 | if (acc > memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc.) |
| 7511 | acc = memorycxx . . $ Tubbs#memory.->max_acccxx . . $ tubbs_data#max_acc.; |
| 7512 | |
| 7513 | // mprintf(0, "Max Speed is %f\n", speed); |
| 7514 | |
| 7515 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 7516 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 7517 | } else { |
| 7518 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Tubbs#memory.->base_speedcxx . . $ tubbs_data#base_speed.); |
| 7519 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Tubbs#memory.->base_acccxx . . $ tubbs_data#base_acc.); |
| 7520 | } |
| 7521 | } |
| 7522 | |
| 7523 | bool Tubbscxx . . $ Tubbs#::DoNotifycxx . . $ Tubbs#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 7524 | int room; |
| 7525 | vectorcxx . . $ vector# pos; |
| 7526 | int weapon_id; |
| 7527 | |
| 7528 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MELEE_ATTACK_FRAMEcxx . . $ `Descent3/aistruct_external.h:309:9`!) { |
| 7529 | if (notify->attack_numcxx . . $ tOSIRISEVTAINOTIFY#$anonymous_type_0#attack_num. == 0) { |
| 7530 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7531 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, 0, &pos); |
| 7532 | |
| 7533 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 7534 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 7535 | } |
| 7536 | } |
| 7537 | |
| 7538 | return true; |
| 7539 | } |
| 7540 | |
| 7541 | int16_t Tubbscxx . . $ Tubbs#::CallEventcxx . . $ Tubbs#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7542 | switch (event) { |
| 7543 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 7544 | DoInitcxx . . $ Tubbs#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7545 | break; |
| 7546 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 7547 | return (DoNotifycxx . . $ Tubbs#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 7548 | break; |
| 7549 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 7550 | DoFramecxx . . $ Tubbs#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7551 | break; |
| 7552 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 7553 | break; |
| 7554 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 7555 | memorycxx . . $ Tubbs#memory. = (tubbs_datacxx . . $ tubbs_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 7556 | } break; |
| 7557 | } |
| 7558 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 7559 | } |
| 7560 | |
| 7561 | //--------------- |
| 7562 | // Old Scratch |
| 7563 | //--------------- |
| 7564 | |
| 7565 | bool OldScratchcxx . . $ OldScratch#::DoStealcxx . . $ OldScratch#DoSteal(cf9ef193275fa6d8).(int me, int it) { |
| 7566 | int max_tries = numSuperThiefableItemscxx . . $ numSuperThiefableItems.; |
| 7567 | float gen_perc, perc_chance; |
| 7568 | ; |
| 7569 | int i; |
| 7570 | int count_max, count_num; |
| 7571 | bool *attempted_steals; |
| 7572 | |
| 7573 | attempted_steals = (bool *)malloccxx . . $ malloc(9f008b2a9698428b).(numSuperThiefableItemscxx . . $ numSuperThiefableItems. * sizeof(bool)); |
| 7574 | if (!attempted_steals) |
| 7575 | return false; |
| 7576 | |
| 7577 | float ftime = Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 7578 | if (ftime == 0) |
| 7579 | ftime = 1.0f; |
| 7580 | srandcxx . . $ srand(6bab9b75950d6f3).(Game_GetTimecxx . . $ Game_GetTime.() / ftime); |
| 7581 | |
| 7582 | for (i = 0; i < numSuperThiefableItemscxx . . $ numSuperThiefableItems.; i++) { |
| 7583 | attempted_steals[i] = false; |
| 7584 | } |
| 7585 | |
| 7586 | while (max_tries--) { |
| 7587 | i = randcxx . . $ rand(9efc7249d839d30e).() % numSuperThiefableItemscxx . . $ numSuperThiefableItems.; |
| 7588 | |
| 7589 | if (attempted_steals[i]) { |
| 7590 | // we already tried this one, try another |
| 7591 | max_tries++; |
| 7592 | continue; |
| 7593 | } |
| 7594 | |
| 7595 | attempted_steals[i] = true; |
| 7596 | |
| 7597 | { |
| 7598 | count_max = MAX_STOLEN_WEAPONScxx . . $ `scripts/AIGame.cpp:402:9`!; |
| 7599 | |
| 7600 | // mprintf(0,"THIEF: Checking %s\n",TXT(SuperThiefableItems[i].name_idx)); |
| 7601 | |
| 7602 | bool can_take = false; |
| 7603 | int amount = 0; |
| 7604 | char message[256]; |
| 7605 | |
| 7606 | switch (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].typecxx . . $ tSuperThiefItems#type.) { |
| 7607 | case THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!: |
| 7608 | // check to see if we can steal the primary |
| 7609 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 7610 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index. != 0 && amount) { |
| 7611 | can_take = true; |
| 7612 | snprintf(message, sizeof(message), TXT_THIEFSTEALcxx . . $ `scripts/AIGame.cpp:147:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 7613 | } |
| 7614 | break; |
| 7615 | |
| 7616 | case THIEFABLEITEM_SECONDARYcxx . . $ `scripts/AIGame.cpp:1629:9`!: |
| 7617 | // check to see if we can steal the secondary |
| 7618 | { |
| 7619 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 7620 | |
| 7621 | if (amount) { |
| 7622 | int max; |
| 7623 | |
| 7624 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index. > 14) { |
| 7625 | // 2nd selection group (black shark, etc) |
| 7626 | max = (19 - SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.) / 2.5f + 1; |
| 7627 | } else { |
| 7628 | // 1st selection group (mega, etc) |
| 7629 | max = (14 - SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.) / 2.5f + 1; |
| 7630 | } |
| 7631 | |
| 7632 | int new_amount = (randcxx . . $ rand(9efc7249d839d30e).() / (float)(RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 1)) * max + 1; |
| 7633 | |
| 7634 | if (new_amount < amount) |
| 7635 | amount = new_amount; |
| 7636 | |
| 7637 | can_take = true; |
| 7638 | |
| 7639 | if (amount == 1) { |
| 7640 | snprintf(message, sizeof(message), TXT_STHIEFSTEALcxx . . $ `scripts/AIGame.cpp:151:9`!, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 7641 | } else { |
| 7642 | snprintf(message, sizeof(message), TXT_STHIEFSTEAL2cxx . . $ `scripts/AIGame.cpp:152:9`!, amount, TXTcxx . . $ `scripts/AIGame.cpp:56:9`!(SuperThiefableItems[i].name_idx)); |
| 7643 | } |
| 7644 | } |
| 7645 | } |
| 7646 | break; |
| 7647 | } |
| 7648 | |
| 7649 | if (!can_take) |
| 7650 | continue; |
| 7651 | |
| 7652 | { |
| 7653 | int powerup_handle; |
| 7654 | int room; |
| 7655 | vectorcxx . . $ vector# pos; |
| 7656 | int j; |
| 7657 | uint16_tcxx . . $ uint16_t# id; |
| 7658 | |
| 7659 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7660 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 7661 | |
| 7662 | for (j = 0; j < amount; j++) { |
| 7663 | float speed = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 20.0f + 5.0f; |
| 7664 | vectorcxx . . $ vector# dir; |
| 7665 | |
| 7666 | dir.xcxx . . $ vector#x. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 7667 | dir.ycxx . . $ vector#y. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 7668 | dir.zcxx . . $ vector#z. = randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! - 0.5f; |
| 7669 | |
| 7670 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&dir); |
| 7671 | dir *=cxx . . $ `operator*=`(f132838b2cd11d6). speed; |
| 7672 | |
| 7673 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYSV_US_WEAPON_POWERUP_IDcxx . . $ `scripts/osiris_common.h:469:9`!, &id, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 7674 | powerup_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, it, &dir); |
| 7675 | } |
| 7676 | } |
| 7677 | |
| 7678 | if (SuperThiefableItemscxx . . $ SuperThiefableItems.[i].typecxx . . $ tSuperThiefItems#type. == THIEFABLEITEM_PRIMARYcxx . . $ `scripts/AIGame.cpp:1628:9`!) { |
| 7679 | amount = 0; |
| 7680 | } else { |
| 7681 | amount *= -1; |
| 7682 | } |
| 7683 | |
| 7684 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(it, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, PLYSV_I_WEAPONcxx . . $ `scripts/osiris_common.h:467:9`!, &amount, SuperThiefableItemscxx . . $ SuperThiefableItems.[i].indexcxx . . $ tSuperThiefItems#index.); |
| 7685 | |
| 7686 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 7687 | return true; |
| 7688 | } |
| 7689 | } |
| 7690 | |
| 7691 | mprintfcxx . . $ mprintf.(0, "Super Thief: Not taking anything\n"); |
| 7692 | freecxx . . $ free(bd21765a0afc8e3c).(attempted_steals); |
| 7693 | return false; // we didn't take anything this try |
| 7694 | } |
| 7695 | |
| 7696 | void OldScratchcxx . . $ OldScratch#::DoInitcxx . . $ OldScratch#DoInit(d4f767463ce0a6b3).(int me) { |
| 7697 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7698 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7699 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(oldscratch_datacxx . . $ oldscratch_data#); |
| 7700 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7701 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7702 | |
| 7703 | memorycxx . . $ OldScratch#memory. = (oldscratch_datacxx . . $ oldscratch_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7704 | |
| 7705 | int diff = Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 7706 | |
| 7707 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed.); |
| 7708 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc.); |
| 7709 | |
| 7710 | switch (diff) { |
| 7711 | case DIFFICULTY_TRAINEEcxx . . $ `Descent3/difficulty_external.h:25:9`!: |
| 7712 | memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. = memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed. * 1.05f; |
| 7713 | memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. = memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc. * 1.05f; |
| 7714 | memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time. = 22.0f; |
| 7715 | break; |
| 7716 | case DIFFICULTY_ROOKIEcxx . . $ `Descent3/difficulty_external.h:26:9`!: |
| 7717 | memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. = memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed. * 1.075f; |
| 7718 | memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. = memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc. * 1.2f; |
| 7719 | memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time. = 20.0f; |
| 7720 | break; |
| 7721 | case DIFFICULTY_HOTSHOTcxx . . $ `Descent3/difficulty_external.h:27:9`!: |
| 7722 | memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. = memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed. * 1.1f; |
| 7723 | memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. = memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc. * 1.3f; |
| 7724 | memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time. = 18.0f; |
| 7725 | break; |
| 7726 | case DIFFICULTY_ACEcxx . . $ `Descent3/difficulty_external.h:28:9`!: |
| 7727 | memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. = memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed. * 1.125f; |
| 7728 | memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. = memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc. * 1.4f; |
| 7729 | memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time. = 15.0f; |
| 7730 | break; |
| 7731 | case DIFFICULTY_INSANEcxx . . $ `Descent3/difficulty_external.h:29:9`!: |
| 7732 | memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. = memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed. * 1.2f; |
| 7733 | memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. = memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc. * 1.5f; |
| 7734 | memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time. = 12.0f; |
| 7735 | break; |
| 7736 | } |
| 7737 | } |
| 7738 | |
| 7739 | void OldScratchcxx . . $ OldScratch#::DoFramecxx . . $ OldScratch#DoFrame(d4f767463ce0a6b3).(int me) { |
| 7740 | float see_time; |
| 7741 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &see_time); |
| 7742 | |
| 7743 | bool used; |
| 7744 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 7745 | |
| 7746 | if (see_time + 4.0f > Game_GetTimecxx . . $ Game_GetTime.() && !used) { |
| 7747 | float speed; |
| 7748 | float acc; |
| 7749 | float ft; |
| 7750 | |
| 7751 | ft = Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 7752 | |
| 7753 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 7754 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 7755 | |
| 7756 | speed += (memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed. - memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed.) * (ft / memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time.); |
| 7757 | acc += (memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc. - memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc.) * (ft / memorycxx . . $ OldScratch#memory.->full_anger_timecxx . . $ oldscratch_data#full_anger_time.); |
| 7758 | |
| 7759 | if (speed > memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed.) |
| 7760 | speed = memorycxx . . $ OldScratch#memory.->max_speedcxx . . $ oldscratch_data#max_speed.; |
| 7761 | if (acc > memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc.) |
| 7762 | acc = memorycxx . . $ OldScratch#memory.->max_acccxx . . $ oldscratch_data#max_acc.; |
| 7763 | |
| 7764 | // mprintf(0, "Max Speed is %f\n", speed); |
| 7765 | |
| 7766 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 7767 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &acc); |
| 7768 | } else { |
| 7769 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ OldScratch#memory.->base_speedcxx . . $ oldscratch_data#base_speed.); |
| 7770 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ OldScratch#memory.->base_acccxx . . $ oldscratch_data#base_acc.); |
| 7771 | } |
| 7772 | } |
| 7773 | |
| 7774 | bool OldScratchcxx . . $ OldScratch#::DoNotifycxx . . $ OldScratch#DoNotify(4ce66e6d2248ca63).(int me, tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify) { |
| 7775 | if (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MELEE_HITcxx . . $ `Descent3/aistruct_external.h:308:9`!) { |
| 7776 | int target_handle; |
| 7777 | int target_type; |
| 7778 | int target_flags; |
| 7779 | |
| 7780 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target_handle); |
| 7781 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &target_type); |
| 7782 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &target_flags); |
| 7783 | |
| 7784 | int diff = Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 7785 | float chance = (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 7786 | |
| 7787 | if (diff == 0 && chance < 0.60f) |
| 7788 | return true; |
| 7789 | |
| 7790 | if (diff == 1 && chance < 0.40f) |
| 7791 | return true; |
| 7792 | |
| 7793 | if (target_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && (target_flags & OF_DESTROYABLEcxx . . $ `Descent3/object_external.h:279:9`!)) { |
| 7794 | bool f_success; |
| 7795 | f_success = DoStealcxx . . $ OldScratch#DoSteal(cf9ef193275fa6d8).(me, target_handle); |
| 7796 | } |
| 7797 | } |
| 7798 | |
| 7799 | return true; |
| 7800 | } |
| 7801 | |
| 7802 | int16_t OldScratchcxx . . $ OldScratch#::CallEventcxx . . $ OldScratch#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7803 | switch (event) { |
| 7804 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 7805 | DoInitcxx . . $ OldScratch#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7806 | break; |
| 7807 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 7808 | return (DoNotifycxx . . $ OldScratch#DoNotify(4ce66e6d2248ca63).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 7809 | break; |
| 7810 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 7811 | DoFramecxx . . $ OldScratch#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 7812 | break; |
| 7813 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 7814 | break; |
| 7815 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 7816 | memorycxx . . $ OldScratch#memory. = (oldscratch_datacxx . . $ oldscratch_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 7817 | } break; |
| 7818 | } |
| 7819 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 7820 | } |
| 7821 | |
| 7822 | //--------------------- |
| 7823 | // BarnSwallow |
| 7824 | //--------------------- |
| 7825 | |
| 7826 | void BarnSwallowcxx . . $ BarnSwallow#::ComputeNextNestPntcxx . . $ BarnSwallow#ComputeNextNestPnt(6819790def3fd1d2).(int me, vectorcxx . . $ vector# *pos) { |
| 7827 | pos->xcxx . . $ vector#x. = (0.5f - (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 7828 | pos->ycxx . . $ vector#y. = (0.5f - (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 7829 | pos->zcxx . . $ vector#z. = (0.5f - (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 7830 | |
| 7831 | pos->ycxx . . $ vector#y. *= 0.3f; |
| 7832 | |
| 7833 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(pos); |
| 7834 | |
| 7835 | *pos =cxx . . $ vector#`operator=`(c0842353a20857d). *pos *cxx . . $ `operator*`(252247219a31502c). memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad.; |
| 7836 | *pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center.; |
| 7837 | } |
| 7838 | |
| 7839 | // #define BSCOMM_FOLLOW_ME 0 // send a percent chance so we |
| 7840 | // can have a line sometimes #define BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWER 2 #define |
| 7841 | // BSCOMM_FOLLOW_CANCEL_FROM_LEADER 3 |
| 7842 | // #define BSCOMM_ATTACK_MY_TARGET 4 |
| 7843 | // BSCOMM_ARE_YOU_IN_MODE |
| 7844 | |
| 7845 | bool BarnSwallowcxx . . $ BarnSwallow#::ReceiveCommandcxx . . $ BarnSwallow#ReceiveCommand(1f243537e7a7078b).(int me, int it, gb_comcxx . . $ gb_com# *command) { |
| 7846 | bool f_ok = true; |
| 7847 | |
| 7848 | switch (command->actioncxx . . $ gb_com#action.) { |
| 7849 | case BSCOMM_FOLLOW_MEcxx . . $ `scripts/AIGame.cpp:2394:9`!: |
| 7850 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_FOLLOWcxx . . $ `scripts/AIGame.cpp:2387:9`!, it); |
| 7851 | break; |
| 7852 | case BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWERcxx . . $ `scripts/AIGame.cpp:2395:9`!: |
| 7853 | memorycxx . . $ BarnSwallow#memory.->followercxx . . $ barnswallow_data#follower. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 7854 | break; |
| 7855 | case BSCOMM_FOLLOW_CANCEL_FROM_LEADERcxx . . $ `scripts/AIGame.cpp:2396:9`!: { |
| 7856 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!); |
| 7857 | } break; |
| 7858 | case BSCOMM_ATTACK_MY_TARGETcxx . . $ `scripts/AIGame.cpp:2397:9`!: { |
| 7859 | int flags; |
| 7860 | int room; |
| 7861 | int me_room; |
| 7862 | |
| 7863 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 7864 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7865 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &me_room); |
| 7866 | |
| 7867 | if ((flags & OF_ATTACHEDcxx . . $ `Descent3/object_external.h:273:9`!) && randcxx . . $ rand(9efc7249d839d30e).() % 10 > 3) { |
| 7868 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!, it); |
| 7869 | } else if (me_room == room) { |
| 7870 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!, it); |
| 7871 | } else if (randcxx . . $ rand(9efc7249d839d30e).() % 10 > 6) { |
| 7872 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!, it); |
| 7873 | } else { |
| 7874 | f_ok = false; |
| 7875 | } |
| 7876 | } break; |
| 7877 | case BSCOMM_ARE_YOU_IN_MODEcxx . . $ `scripts/AIGame.cpp:2398:9`!: { |
| 7878 | f_ok = (memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. == command->indexcxx . . $ gb_com#index.); |
| 7879 | } break; |
| 7880 | case BSCOMM_ARE_YOU_AFTER_POWERUPcxx . . $ `scripts/AIGame.cpp:2399:9`!: { |
| 7881 | f_ok = (memorycxx . . $ BarnSwallow#memory.->powerup_idcxx . . $ barnswallow_data#powerup_id. == command->indexcxx . . $ gb_com#index.); |
| 7882 | } |
| 7883 | } |
| 7884 | |
| 7885 | return f_ok; |
| 7886 | } |
| 7887 | |
| 7888 | bool BarnSwallowcxx . . $ BarnSwallow#::SendCommandcxx . . $ BarnSwallow#SendCommand(4d3b4c86c9f4d858).(int me, int it, char action, int value) { |
| 7889 | bool f_ok; |
| 7890 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# data; |
| 7891 | gb_comcxx . . $ gb_com# command; |
| 7892 | |
| 7893 | data.me_handlecxx . . $ tOSIRISEventInfo#me_handle. = it; |
| 7894 | data.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle. = me; |
| 7895 | |
| 7896 | command.actioncxx . . $ gb_com#action. = action; |
| 7897 | command.indexcxx . . $ gb_com#index. = value; |
| 7898 | |
| 7899 | data.extra_infocxx . . $ tOSIRISEventInfo#extra_info. = (void *)&command; |
| 7900 | data.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. = AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!; |
| 7901 | |
| 7902 | f_ok = Obj_CallEventcxx . . $ Obj_CallEvent.(it, EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!, &data); |
| 7903 | if (f_ok || command.actioncxx . . $ gb_com#action. == BSCOMM_FOLLOW_CANCEL_FROM_LEADERcxx . . $ `scripts/AIGame.cpp:2396:9`!) { |
| 7904 | switch (command.actioncxx . . $ gb_com#action.) { |
| 7905 | case BSCOMM_FOLLOW_MEcxx . . $ `scripts/AIGame.cpp:2394:9`!: |
| 7906 | memorycxx . . $ BarnSwallow#memory.->followercxx . . $ barnswallow_data#follower. = it; |
| 7907 | break; |
| 7908 | case BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWERcxx . . $ `scripts/AIGame.cpp:2395:9`!: |
| 7909 | memorycxx . . $ BarnSwallow#memory.->followercxx . . $ barnswallow_data#follower. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 7910 | break; |
| 7911 | case BSCOMM_FOLLOW_CANCEL_FROM_LEADERcxx . . $ `scripts/AIGame.cpp:2396:9`!: |
| 7912 | memorycxx . . $ BarnSwallow#memory.->followercxx . . $ barnswallow_data#follower. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 7913 | break; |
| 7914 | } |
| 7915 | } |
| 7916 | return f_ok; |
| 7917 | } |
| 7918 | |
| 7919 | void BarnSwallowcxx . . $ BarnSwallow#::DoInitcxx . . $ BarnSwallow#DoInit(d4f767463ce0a6b3).(int me) { |
| 7920 | int i; |
| 7921 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 7922 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 7923 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(barnswallow_datacxx . . $ barnswallow_data#); |
| 7924 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 7925 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 7926 | |
| 7927 | memorycxx . . $ BarnSwallow#memory. = (barnswallow_datacxx . . $ barnswallow_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 7928 | |
| 7929 | memorycxx . . $ BarnSwallow#memory.->followercxx . . $ barnswallow_data#follower. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 7930 | |
| 7931 | ComputeNestcxx . . $ BarnSwallow#ComputeNest(d4f767463ce0a6b3).(me); |
| 7932 | |
| 7933 | memorycxx . . $ BarnSwallow#memory.->next_friend_update_timecxx . . $ barnswallow_data#next_friend_update_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f; |
| 7934 | memorycxx . . $ BarnSwallow#memory.->next_attack_timecxx . . $ barnswallow_data#next_attack_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 7935 | memorycxx . . $ BarnSwallow#memory.->next_powerup_timecxx . . $ barnswallow_data#next_powerup_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 2.0f; |
| 7936 | |
| 7937 | memorycxx . . $ BarnSwallow#memory.->last_non_attack_modecxx . . $ barnswallow_data#last_non_attack_mode. = memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. = BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!; |
| 7938 | memorycxx . . $ BarnSwallow#memory.->mode_timecxx . . $ barnswallow_data#mode_time. = 0.0f; |
| 7939 | |
| 7940 | memorycxx . . $ BarnSwallow#memory.->flagscxx . . $ barnswallow_data#flags. = 0; |
| 7941 | |
| 7942 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!); |
| 7943 | } |
| 7944 | |
| 7945 | bool BarnSwallowcxx . . $ BarnSwallow#::DoNotifycxx . . $ BarnSwallow#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 7946 | if (IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.)) // chrishack -- handle invalid goal cases if I should |
| 7947 | { |
| 7948 | switch (memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode.) { |
| 7949 | case BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!: { |
| 7950 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 7951 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!); |
| 7952 | return false; |
| 7953 | } |
| 7954 | } break; |
| 7955 | case BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!: { |
| 7956 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 7957 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!); |
| 7958 | return false; |
| 7959 | } |
| 7960 | } break; |
| 7961 | case BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!: { |
| 7962 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 7963 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!); |
| 7964 | return false; |
| 7965 | } |
| 7966 | } break; |
| 7967 | case BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!: |
| 7968 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 7969 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`!); |
| 7970 | return false; |
| 7971 | } |
| 7972 | break; |
| 7973 | } |
| 7974 | } else if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!) { |
| 7975 | return ReceiveCommandcxx . . $ BarnSwallow#ReceiveCommand(1f243537e7a7078b).(me, data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., (gb_comcxx . . $ gb_com# *)data->extra_infocxx . . $ tOSIRISEventInfo#extra_info.); |
| 7976 | } |
| 7977 | |
| 7978 | return true; |
| 7979 | } |
| 7980 | |
| 7981 | void BarnSwallowcxx . . $ BarnSwallow#::ComputeNestcxx . . $ BarnSwallow#ComputeNest(d4f767463ce0a6b3).(int me) { |
| 7982 | memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends. = 0; |
| 7983 | int scan_objs[100]; |
| 7984 | int n_scan; |
| 7985 | int i; |
| 7986 | vectorcxx . . $ vector# pos; |
| 7987 | int room; |
| 7988 | int type; |
| 7989 | uint16_tcxx . . $ uint16_t# id; |
| 7990 | |
| 7991 | memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends. = 0; |
| 7992 | |
| 7993 | for (i = 0; i < BS_MAX_FRIENDScxx . . $ `scripts/AIGame.cpp:2404:9`!; i++) |
| 7994 | memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[i] = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 7995 | |
| 7996 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 7997 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 7998 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 7999 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 8000 | |
| 8001 | memorycxx . . $ BarnSwallow#memory.->home_roomcxx . . $ barnswallow_data#home_room. = room; |
| 8002 | memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). |
| 8003 | pos; // Each robot will have a different center point becuase thier initial positions are weighted twice |
| 8004 | memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad. = 0.0f; |
| 8005 | |
| 8006 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 1000.0f, scan_objs, 100, false, true, false, true); |
| 8007 | |
| 8008 | for (i = 0; i < n_scan; i++) { |
| 8009 | if (scan_objs[i] != me) { |
| 8010 | int c_type; |
| 8011 | uint16_tcxx . . $ uint16_t# c_id; |
| 8012 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &c_type); |
| 8013 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &c_id); |
| 8014 | |
| 8015 | // See if we are the same species |
| 8016 | if (type == c_type && id == c_id) { |
| 8017 | vectorcxx . . $ vector# c_pos; |
| 8018 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &c_pos); |
| 8019 | |
| 8020 | memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center. +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). c_pos; |
| 8021 | |
| 8022 | memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.++] = scan_objs[i]; |
| 8023 | } |
| 8024 | } |
| 8025 | } |
| 8026 | |
| 8027 | if (memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.) |
| 8028 | memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center. /=cxx . . $ `operator/=`(f132838b2cd11d6). memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends. + 1; |
| 8029 | |
| 8030 | // Determine the farthest distance from the center of the nest |
| 8031 | for (i = 0; i < memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.; i++) { |
| 8032 | vectorcxx . . $ vector# c_pos; |
| 8033 | float dist; |
| 8034 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &c_pos); |
| 8035 | dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center., &c_pos); |
| 8036 | |
| 8037 | if (dist * 0.9f > memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad.) |
| 8038 | memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad. = dist * 0.9f; |
| 8039 | } |
| 8040 | |
| 8041 | if (memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad. < 5.0f) |
| 8042 | memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad. = 5.0f; |
| 8043 | } |
| 8044 | |
| 8045 | void BarnSwallowcxx . . $ BarnSwallow#::UpdateFriendListcxx . . $ BarnSwallow#UpdateFriendList(d4f767463ce0a6b3).(int me) { |
| 8046 | int i; |
| 8047 | int j; |
| 8048 | |
| 8049 | for (i = 0; i < memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.; i++) { |
| 8050 | int type; |
| 8051 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 8052 | |
| 8053 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 8054 | for (j = i; j < memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends. - 1; j++) { |
| 8055 | memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[j] = memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[j + 1]; |
| 8056 | } |
| 8057 | |
| 8058 | i--; // Retest as the slot is now being used by what was the next item |
| 8059 | memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.--; |
| 8060 | } |
| 8061 | } |
| 8062 | } |
| 8063 | |
| 8064 | void BarnSwallowcxx . . $ BarnSwallow#::DoFramecxx . . $ BarnSwallow#DoFrame(d4f767463ce0a6b3).(int me) { |
| 8065 | if (memorycxx . . $ BarnSwallow#memory.->next_friend_update_timecxx . . $ barnswallow_data#next_friend_update_time. < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 8066 | memorycxx . . $ BarnSwallow#memory.->next_friend_update_timecxx . . $ barnswallow_data#next_friend_update_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f; |
| 8067 | |
| 8068 | UpdateFriendListcxx . . $ BarnSwallow#UpdateFriendList(d4f767463ce0a6b3).(me); |
| 8069 | } |
| 8070 | |
| 8071 | switch (memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode.) { |
| 8072 | case BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!: { |
| 8073 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ BarnSwallow#memory.->next_mode_timecxx . . $ barnswallow_data#next_mode_time.) { |
| 8074 | int target; |
| 8075 | int room = 0; |
| 8076 | int me_room = 0; |
| 8077 | |
| 8078 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target); |
| 8079 | |
| 8080 | if (target != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 8081 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8082 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &me_room); |
| 8083 | } |
| 8084 | |
| 8085 | if (target != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`! && room == me_room) |
| 8086 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!); |
| 8087 | else |
| 8088 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!); |
| 8089 | } |
| 8090 | |
| 8091 | if (Game_GetTimecxx . . $ Game_GetTime.() > memorycxx . . $ BarnSwallow#memory.->next_powerup_timecxx . . $ barnswallow_data#next_powerup_time.) { |
| 8092 | int rand_val = randcxx . . $ rand(9efc7249d839d30e).() % 100; |
| 8093 | |
| 8094 | memorycxx . . $ BarnSwallow#memory.->next_powerup_timecxx . . $ barnswallow_data#next_powerup_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 2.0f; |
| 8095 | |
| 8096 | if (rand_val < 20) // Play with local powerups |
| 8097 | { |
| 8098 | int scan_objs[50]; |
| 8099 | int n_scan; |
| 8100 | int i; |
| 8101 | int n_powerups = 0; |
| 8102 | int powerups[50]; |
| 8103 | int room; |
| 8104 | vectorcxx . . $ vector# pos; |
| 8105 | |
| 8106 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 8107 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8108 | |
| 8109 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 30.0f, scan_objs, 50, false, false, false, true); |
| 8110 | |
| 8111 | for (i = 0; i < n_scan; i++) { |
| 8112 | int type; |
| 8113 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 8114 | if (type == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) { |
| 8115 | powerups[n_powerups++] = scan_objs[i]; |
| 8116 | } |
| 8117 | } |
| 8118 | |
| 8119 | if (n_powerups) { |
| 8120 | int index = randcxx . . $ rand(9efc7249d839d30e).() % n_powerups; |
| 8121 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!, powerups[index]); |
| 8122 | } |
| 8123 | } |
| 8124 | if (rand_val > 95) // Find a remote powerup and go get it |
| 8125 | { |
| 8126 | int i; |
| 8127 | bool f_ok = true; |
| 8128 | |
| 8129 | // for(i = 0; i < memory->num_friends; i++) |
| 8130 | // { |
| 8131 | // int room = memory->home_room; // Acounts for dead friends |
| 8132 | // } |
| 8133 | |
| 8134 | int p_handle = AI_FindObjOfTypecxx . . $ AI_FindObjOfType(7a8817038ab5ca8a).(me, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, -1, true); |
| 8135 | |
| 8136 | for (i = 0; i < memorycxx . . $ BarnSwallow#memory.->num_friendscxx . . $ barnswallow_data#num_friends.; i++) { |
| 8137 | if (SendCommandcxx . . $ BarnSwallow#SendCommand(4d3b4c86c9f4d858).(me, memorycxx . . $ BarnSwallow#memory.->friendscxx . . $ barnswallow_data#friends.[i], BSCOMM_ARE_YOU_AFTER_POWERUPcxx . . $ `scripts/AIGame.cpp:2399:9`!, p_handle)) { |
| 8138 | p_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 8139 | break; |
| 8140 | } |
| 8141 | } |
| 8142 | |
| 8143 | if (p_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 8144 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!, p_handle); |
| 8145 | } |
| 8146 | } |
| 8147 | } |
| 8148 | } break; |
| 8149 | case BSM_FOLLOWcxx . . $ `scripts/AIGame.cpp:2387:9`!: { |
| 8150 | } break; |
| 8151 | case BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!: { |
| 8152 | if (memorycxx . . $ BarnSwallow#memory.->mode_timecxx . . $ barnswallow_data#mode_time. > memorycxx . . $ BarnSwallow#memory.->max_time_on_roadcxx . . $ barnswallow_data#max_time_on_road.) { |
| 8153 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!); |
| 8154 | } |
| 8155 | } break; |
| 8156 | case BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!: { |
| 8157 | float last_see_target_time; |
| 8158 | float last_hear_target_time; |
| 8159 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_target_time); |
| 8160 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_target_time); |
| 8161 | |
| 8162 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 8163 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, memorycxx . . $ BarnSwallow#memory.->last_non_attack_modecxx . . $ barnswallow_data#last_non_attack_mode.); |
| 8164 | float dist; |
| 8165 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_F_DIST_TO_GOALcxx . . $ `scripts/osiris_common.h:596:9`!, &dist); |
| 8166 | } break; |
| 8167 | case BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`!: { |
| 8168 | float last_see_target_time; |
| 8169 | float last_hear_target_time; |
| 8170 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_target_time); |
| 8171 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_target_time); |
| 8172 | |
| 8173 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 8174 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, memorycxx . . $ BarnSwallow#memory.->last_non_attack_modecxx . . $ barnswallow_data#last_non_attack_mode.); |
| 8175 | |
| 8176 | if (memorycxx . . $ BarnSwallow#memory.->mode_timecxx . . $ barnswallow_data#mode_time. > 5.0f) |
| 8177 | SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(me, BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!); |
| 8178 | } break; |
| 8179 | case BSM_FLEEcxx . . $ `scripts/AIGame.cpp:2391:9`!: { |
| 8180 | } break; |
| 8181 | case BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!: { |
| 8182 | |
| 8183 | } break; |
| 8184 | } |
| 8185 | |
| 8186 | memorycxx . . $ BarnSwallow#memory.->mode_timecxx . . $ barnswallow_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8187 | } |
| 8188 | |
| 8189 | bool BarnSwallowcxx . . $ BarnSwallow#::SetModecxx . . $ BarnSwallow#SetMode(db021eaee9c3e7a9).(int me, char mode, int it) { |
| 8190 | // if(mode == BSM_ATTACK && memory->next_attack_time < Game_GetTime()) |
| 8191 | // return false; |
| 8192 | int f_attack_flags = (AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!); |
| 8193 | |
| 8194 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 8195 | |
| 8196 | if (memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. != BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`! && memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. != BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`!) { |
| 8197 | memorycxx . . $ BarnSwallow#memory.->last_non_attack_modecxx . . $ barnswallow_data#last_non_attack_mode. = memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode.; |
| 8198 | |
| 8199 | if (mode != BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`! && mode != BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`!) |
| 8200 | memorycxx . . $ BarnSwallow#memory.->powerup_idcxx . . $ barnswallow_data#powerup_id. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 8201 | } else { |
| 8202 | if (mode == BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!) |
| 8203 | it = memorycxx . . $ BarnSwallow#memory.->powerup_idcxx . . $ barnswallow_data#powerup_id.; |
| 8204 | } |
| 8205 | |
| 8206 | // If we are not just floating around in the nest, then reset the next_powerup_time |
| 8207 | if (mode == BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`! && memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. != BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!) |
| 8208 | memorycxx . . $ BarnSwallow#memory.->next_powerup_timecxx . . $ barnswallow_data#next_powerup_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 2.0f; |
| 8209 | |
| 8210 | if (memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. == BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!) { |
| 8211 | Obj_UnattachChildrencxx . . $ Obj_UnattachChildren.(me); |
| 8212 | memorycxx . . $ BarnSwallow#memory.->powerup_idcxx . . $ barnswallow_data#powerup_id. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 8213 | } |
| 8214 | |
| 8215 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 8216 | |
| 8217 | switch (mode) { |
| 8218 | case BSM_NESTcxx . . $ `scripts/AIGame.cpp:2386:9`!: { |
| 8219 | int room; |
| 8220 | float max_speed; |
| 8221 | vectorcxx . . $ vector# pos; |
| 8222 | |
| 8223 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &max_speed); |
| 8224 | float update_time = memorycxx . . $ BarnSwallow#memory.->nest_radcxx . . $ barnswallow_data#nest_rad. / (max_speed) + 0.3f - ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 8225 | if (update_time < .6f) |
| 8226 | update_time = .6f; |
| 8227 | |
| 8228 | memorycxx . . $ BarnSwallow#memory.->next_mode_timecxx . . $ barnswallow_data#next_mode_time. = Game_GetTimecxx . . $ Game_GetTime.() + update_time; |
| 8229 | |
| 8230 | ComputeNextNestPntcxx . . $ BarnSwallow#ComputeNextNestPnt(6819790def3fd1d2).(me, &pos); |
| 8231 | |
| 8232 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`!, &pos, memorycxx . . $ BarnSwallow#memory.->home_roomcxx . . $ barnswallow_data#home_room.); |
| 8233 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 10.0f); |
| 8234 | } break; |
| 8235 | case BSM_FOLLOWcxx . . $ `scripts/AIGame.cpp:2387:9`!: { |
| 8236 | } break; |
| 8237 | case BSM_GET_POWERUPcxx . . $ `scripts/AIGame.cpp:2388:9`!: { |
| 8238 | float dist = 20.0f; |
| 8239 | |
| 8240 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_ATTACH_TO_OBJcxx . . $ `Descent3/aistruct_external.h:184:9`!, 1, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`!, it, 0, 0, 0.9f, 0, 1); |
| 8241 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 8242 | |
| 8243 | // Make the barnswallow return home after awhile -- chrishack -- check vis before returning! |
| 8244 | memorycxx . . $ BarnSwallow#memory.->max_time_on_roadcxx . . $ barnswallow_data#max_time_on_road. = 12.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * 20.0f; |
| 8245 | memorycxx . . $ BarnSwallow#memory.->powerup_idcxx . . $ barnswallow_data#powerup_id. = it; |
| 8246 | } break; |
| 8247 | case BSM_ATTACKcxx . . $ `scripts/AIGame.cpp:2389:9`!: { |
| 8248 | float dist = 40.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f; |
| 8249 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 8250 | |
| 8251 | memorycxx . . $ BarnSwallow#memory.->next_attack_timecxx . . $ barnswallow_data#next_attack_time. = Game_GetTimecxx . . $ Game_GetTime.() + 10.0 * ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!); |
| 8252 | |
| 8253 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, |
| 8254 | GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`! | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 8255 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 8256 | |
| 8257 | dist = 40.0f; |
| 8258 | int g_index = AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 8259 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 8260 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 8261 | } break; |
| 8262 | case BSM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:2390:9`!: { |
| 8263 | vectorcxx . . $ vector# pos; |
| 8264 | int room; |
| 8265 | |
| 8266 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 8267 | |
| 8268 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 8269 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8270 | |
| 8271 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, |
| 8272 | GF_SPEED_FLEEcxx . . $ `Descent3/aistruct_external.h:251:9`! | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &pos, room); |
| 8273 | |
| 8274 | float dist = 40.0f; |
| 8275 | int g_index = AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 8276 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 8277 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 8278 | } break; |
| 8279 | case BSM_FLEEcxx . . $ `scripts/AIGame.cpp:2391:9`!: { |
| 8280 | } break; |
| 8281 | case BSM_RETURN_TO_NESTcxx . . $ `scripts/AIGame.cpp:2392:9`!: { |
| 8282 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 1, 1.0, -1, GF_SPEED_FLEEcxx . . $ `Descent3/aistruct_external.h:251:9`! | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`!, |
| 8283 | &memorycxx . . $ BarnSwallow#memory.->nest_centercxx . . $ barnswallow_data#nest_center., memorycxx . . $ BarnSwallow#memory.->home_roomcxx . . $ barnswallow_data#home_room.); |
| 8284 | AI_SetGoalCircleDistcxx . . $ AI_SetGoalCircleDist.(me, 1, 5.0f); |
| 8285 | } break; |
| 8286 | } |
| 8287 | |
| 8288 | memorycxx . . $ BarnSwallow#memory.->modecxx . . $ barnswallow_data#mode. = mode; |
| 8289 | |
| 8290 | memorycxx . . $ BarnSwallow#memory.->mode_timecxx . . $ barnswallow_data#mode_time. = 0.0f; |
| 8291 | return true; |
| 8292 | } |
| 8293 | |
| 8294 | int16_t BarnSwallowcxx . . $ BarnSwallow#::CallEventcxx . . $ BarnSwallow#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 8295 | switch (event) { |
| 8296 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 8297 | DoFramecxx . . $ BarnSwallow#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8298 | break; |
| 8299 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 8300 | DoInitcxx . . $ BarnSwallow#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8301 | break; |
| 8302 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 8303 | return (DoNotifycxx . . $ BarnSwallow#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 8304 | break; |
| 8305 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: |
| 8306 | break; |
| 8307 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 8308 | memorycxx . . $ BarnSwallow#memory. = (barnswallow_datacxx . . $ barnswallow_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 8309 | } break; |
| 8310 | } |
| 8311 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 8312 | } |
| 8313 | |
| 8314 | //=================== |
| 8315 | // GBPowerup |
| 8316 | //=================== |
| 8317 | |
| 8318 | void GBPowerupcxx . . $ GBPowerup#::DoInitcxx . . $ GBPowerup#DoInit(d4f767463ce0a6b3).(int me) { |
| 8319 | int i; |
| 8320 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 8321 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 8322 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(gbpowerup_datacxx . . $ gbpowerup_data#); |
| 8323 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 8324 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 8325 | |
| 8326 | memorycxx . . $ GBPowerup#memory. = (gbpowerup_datacxx . . $ gbpowerup_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 8327 | memorycxx . . $ GBPowerup#memory.->next_check_timecxx . . $ gbpowerup_data#next_check_time. = Game_GetTimecxx . . $ Game_GetTime.() + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; // Sead the powerups differently :) |
| 8328 | memorycxx . . $ GBPowerup#memory.->time_till_next_hud_messagecxx . . $ gbpowerup_data#time_till_next_hud_message. = 0.0f; |
| 8329 | |
| 8330 | uint16_tcxx . . $ uint16_t# short_id[6]; |
| 8331 | |
| 8332 | short_id[0] = Obj_FindIDcxx . . $ Obj_FindID.("Buddyextinguisher"); |
| 8333 | short_id[1] = Obj_FindIDcxx . . $ Obj_FindID.("buddywingnut"); |
| 8334 | short_id[2] = Obj_FindIDcxx . . $ Obj_FindID.("buddycontrol"); |
| 8335 | short_id[3] = Obj_FindIDcxx . . $ Obj_FindID.("buddyassist"); |
| 8336 | short_id[4] = Obj_FindIDcxx . . $ Obj_FindID.("buddyantivirus"); |
| 8337 | short_id[5] = Obj_FindIDcxx . . $ Obj_FindID.("buddyspeed"); |
| 8338 | |
| 8339 | uint16_tcxx . . $ uint16_t# id; |
| 8340 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 8341 | |
| 8342 | memorycxx . . $ GBPowerup#memory.->typecxx . . $ gbpowerup_data#type. = 5; // Forces it to the speed powerup if it didn't know what it was... |
| 8343 | for (i = 0; i < 6; i++) { |
| 8344 | if (id == short_id[i]) { |
| 8345 | memorycxx . . $ GBPowerup#memory.->typecxx . . $ gbpowerup_data#type. = i; |
| 8346 | } |
| 8347 | } |
| 8348 | } |
| 8349 | |
| 8350 | void GBPowerupcxx . . $ GBPowerup#::DoFramecxx . . $ GBPowerup#DoFrame(d4f767463ce0a6b3).(int me) { |
| 8351 | if (memorycxx . . $ GBPowerup#memory.->next_check_timecxx . . $ gbpowerup_data#next_check_time. <= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 8352 | vectorcxx . . $ vector# pos; |
| 8353 | int room; |
| 8354 | int scan_objs[25]; |
| 8355 | int n_scan; |
| 8356 | int i; |
| 8357 | |
| 8358 | memorycxx . . $ GBPowerup#memory.->next_check_timecxx . . $ gbpowerup_data#next_check_time. = Game_GetTimecxx . . $ Game_GetTime.() + .2f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * .3f; |
| 8359 | |
| 8360 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 8361 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8362 | |
| 8363 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 5.0f, scan_objs, 25, false, true, false, true); |
| 8364 | |
| 8365 | for (i = 0; i < n_scan; i++) { |
| 8366 | int type; |
| 8367 | int16_t id; |
| 8368 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 8369 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 8370 | |
| 8371 | if (type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! && (id == ROBOT_GUIDEBOTcxx . . $ `Descent3/object_external.h:354:9`! || id == ROBOT_GUIDEBOTREDcxx . . $ `Descent3/object_external.h:355:9`!)) { |
| 8372 | vectorcxx . . $ vector# g_pos; |
| 8373 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &g_pos); |
| 8374 | |
| 8375 | float dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&pos, &g_pos); |
| 8376 | |
| 8377 | if (dist < 5.0f) { |
| 8378 | gb_comcxx . . $ gb_com# command; |
| 8379 | command.actioncxx . . $ gb_com#action. = COM_POWERUP_PICKUPcxx . . $ `scripts/AIGame.cpp:1508:9`!; |
| 8380 | command.indexcxx . . $ gb_com#index. = memorycxx . . $ GBPowerup#memory.->typecxx . . $ gbpowerup_data#type.; |
| 8381 | |
| 8382 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# data; |
| 8383 | data.me_handlecxx . . $ tOSIRISEventInfo#me_handle. = scan_objs[i]; |
| 8384 | data.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle. = me; |
| 8385 | |
| 8386 | data.extra_infocxx . . $ tOSIRISEventInfo#extra_info. = (void *)&command; |
| 8387 | data.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. = AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!; |
| 8388 | |
| 8389 | Obj_CallEventcxx . . $ Obj_CallEvent.(scan_objs[i], EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!, &data); |
| 8390 | |
| 8391 | break; |
| 8392 | } |
| 8393 | } |
| 8394 | } |
| 8395 | } |
| 8396 | } |
| 8397 | |
| 8398 | int16_t GBPowerupcxx . . $ GBPowerup#::CallEventcxx . . $ GBPowerup#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 8399 | switch (event) { |
| 8400 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: |
| 8401 | memorycxx . . $ GBPowerup#memory.->time_till_next_hud_messagecxx . . $ gbpowerup_data#time_till_next_hud_message. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8402 | break; |
| 8403 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 8404 | DoInitcxx . . $ GBPowerup#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8405 | break; |
| 8406 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 8407 | DoFramecxx . . $ GBPowerup#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8408 | break; |
| 8409 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 8410 | if (memorycxx . . $ GBPowerup#memory.->time_till_next_hud_messagecxx . . $ gbpowerup_data#time_till_next_hud_message. <= 0.0f) { |
| 8411 | int type; |
| 8412 | |
| 8413 | memorycxx . . $ GBPowerup#memory.->time_till_next_hud_messagecxx . . $ gbpowerup_data#time_till_next_hud_message. = 1.0f; |
| 8414 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 8415 | |
| 8416 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 8417 | Player_AddHudMessagecxx . . $ Player_AddHudMessage.(data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., TXT_GB_POWERUPcxx . . $ `scripts/AIGame.cpp:150:9`!); |
| 8418 | } |
| 8419 | } |
| 8420 | } break; |
| 8421 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 8422 | memorycxx . . $ GBPowerup#memory. = (gbpowerup_datacxx . . $ gbpowerup_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 8423 | } break; |
| 8424 | } |
| 8425 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 8426 | } |
| 8427 | |
| 8428 | //------------------ |
| 8429 | // Sparky class |
| 8430 | //------------------ |
| 8431 | |
| 8432 | bool Sparkycxx . . $ Sparky#::DoNotifycxx . . $ Sparky#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 8433 | // NOTE: I am also doing the rotational stuff here... So, no need to make a seperate AIN_SCRIPTED_ORIENT event |
| 8434 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 0 && data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_SCRIPTED_GOALcxx . . $ `Descent3/aistruct_external.h:304:9`!) { |
| 8435 | vectorcxx . . $ vector# rvel; |
| 8436 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me_handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:632:9`!, &rvel); |
| 8437 | |
| 8438 | if (memorycxx . . $ Sparky#memory.->spin_dircxx . . $ sparky_data#spin_dir. == SPARKY_ROT_LEFTcxx . . $ `scripts/AIGame.cpp:646:9`!) { |
| 8439 | rvel.ycxx . . $ vector#y. -= DEATH_ROT_ACCcxx . . $ `scripts/AIGame.cpp:643:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8440 | } else { |
| 8441 | rvel.ycxx . . $ vector#y. += DEATH_ROT_ACCcxx . . $ `scripts/AIGame.cpp:643:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8442 | } |
| 8443 | |
| 8444 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me_handle, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:632:9`!, &rvel); |
| 8445 | |
| 8446 | vectorcxx . . $ vector# dir = Zero_vectorcxx . . $ Zero_vector.; |
| 8447 | AI_Valuecxx . . $ AI_Value.(me_handle, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_V_MOVEMENT_DIRcxx . . $ `scripts/osiris_common.h:535:9`!, &dir); |
| 8448 | } |
| 8449 | |
| 8450 | return true; |
| 8451 | } |
| 8452 | |
| 8453 | void Sparkycxx . . $ Sparky#::SetModecxx . . $ Sparky#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 8454 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 8455 | |
| 8456 | switch (mode) { |
| 8457 | case SPARKY_NORMALcxx . . $ `scripts/AIGame.cpp:649:9`!: { |
| 8458 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_ROTDRAGcxx . . $ `scripts/osiris_common.h:640:9`!, &memorycxx . . $ Sparky#memory.->dragcxx . . $ sparky_data#drag.); |
| 8459 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_MELEE1cxx . . $ `Descent3/aistruct_external.h:80:9`!); |
| 8460 | } break; |
| 8461 | case SPARKY_DYINGcxx . . $ `scripts/AIGame.cpp:650:9`!: { |
| 8462 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:197:9`!, 0, 1000.0f, -1, GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`! | GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 8463 | |
| 8464 | float drag = 0.0f; |
| 8465 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_ROTDRAGcxx . . $ `scripts/osiris_common.h:640:9`!, &drag); |
| 8466 | } break; |
| 8467 | } |
| 8468 | |
| 8469 | memorycxx . . $ Sparky#memory.->last_spark_timecxx . . $ sparky_data#last_spark_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 8470 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. = 0.0f; |
| 8471 | memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. = 0.0f; |
| 8472 | memorycxx . . $ Sparky#memory.->modecxx . . $ sparky_data#mode. = mode; |
| 8473 | } |
| 8474 | |
| 8475 | void Sparkycxx . . $ Sparky#::DoInitcxx . . $ Sparky#DoInit(d4f767463ce0a6b3).(int me) { |
| 8476 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 8477 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 8478 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(sparky_datacxx . . $ sparky_data#); |
| 8479 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 8480 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 8481 | |
| 8482 | memorycxx . . $ Sparky#memory. = (sparky_datacxx . . $ sparky_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 8483 | |
| 8484 | memorycxx . . $ Sparky#memory.->f_rotation_death_enabledcxx . . $ sparky_data#f_rotation_death_enabled. = true; |
| 8485 | memorycxx . . $ Sparky#memory.->matcen_idcxx . . $ sparky_data#matcen_id. = -1; |
| 8486 | memorycxx . . $ Sparky#memory.->modecxx . . $ sparky_data#mode. = SPARKY_NORMALcxx . . $ `scripts/AIGame.cpp:649:9`!; |
| 8487 | memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. = 0.0f; |
| 8488 | memorycxx . . $ Sparky#memory.->spin_dircxx . . $ sparky_data#spin_dir. = SPARKY_NO_ROTcxx . . $ `scripts/AIGame.cpp:645:9`!; |
| 8489 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. = 0.0f; |
| 8490 | |
| 8491 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_ROTDRAGcxx . . $ `scripts/osiris_common.h:640:9`!, &memorycxx . . $ Sparky#memory.->dragcxx . . $ sparky_data#drag.); |
| 8492 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &memorycxx . . $ Sparky#memory.->orientcxx . . $ sparky_data#orient.); |
| 8493 | |
| 8494 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8495 | |
| 8496 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 8497 | mstruct.g1cxx . . $ msafe_struct#g1. = 0; |
| 8498 | mstruct.g2cxx . . $ msafe_struct#g2. = 1; |
| 8499 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 1000000000.0f; |
| 8500 | mstruct.sizecxx . . $ msafe_struct#size. = 5.1f; |
| 8501 | |
| 8502 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &mstruct.roomnumcxx . . $ msafe_struct#roomnum.); |
| 8503 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, 0, &mstruct.poscxx . . $ msafe_struct#pos.); |
| 8504 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, 1, &mstruct.pos2cxx . . $ msafe_struct#pos2.); |
| 8505 | |
| 8506 | mstruct.statecxx . . $ msafe_struct#state. = 0; |
| 8507 | mstruct.intervalcxx . . $ msafe_struct#interval. = 0.5f; |
| 8508 | mstruct.countcxx . . $ msafe_struct#count. = 2; |
| 8509 | mstruct.indexcxx . . $ msafe_struct#index. = 2; |
| 8510 | mstruct.texnumcxx . . $ msafe_struct#texnum. = Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("FunkyEffect2"); |
| 8511 | // rbg |
| 8512 | mstruct.colorcxx . . $ msafe_struct#color. = ((128 >> 3) << 10) | ((128 >> 3) << 5) | (128 >> 3); |
| 8513 | mstruct.flagscxx . . $ msafe_struct#flags. = 1; |
| 8514 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_WEATHER_LIGHTNING_BOLTcxx . . $ `scripts/osiris_common.h:863:9`!, &mstruct); |
| 8515 | |
| 8516 | memorycxx . . $ Sparky#memory.->last_spark_timecxx . . $ sparky_data#last_spark_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 8517 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. = 0.0f; |
| 8518 | memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. = 0.0f; |
| 8519 | } |
| 8520 | |
| 8521 | void Sparkycxx . . $ Sparky#::DoFramecxx . . $ Sparky#DoFrame(d4f767463ce0a6b3).(int me) { |
| 8522 | |
| 8523 | if (memorycxx . . $ Sparky#memory.->modecxx . . $ sparky_data#mode. == SPARKY_NORMALcxx . . $ `scripts/AIGame.cpp:649:9`!) { |
| 8524 | char spin_dir; |
| 8525 | matrixcxx . . $ matrix# orient; |
| 8526 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 8527 | |
| 8528 | float dot = orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(4a721543d64e126a). memorycxx . . $ Sparky#memory.->orientcxx . . $ sparky_data#orient..rveccxx . . $ matrix#rvec.; |
| 8529 | if (dot < -1.0f) |
| 8530 | dot = -1.0f; |
| 8531 | else if (dot > 1.0f) |
| 8532 | dot = 1.0f; |
| 8533 | |
| 8534 | float ang = acoscxx . . $ acos(fbcf3211dfe1bfd1).(dot); |
| 8535 | |
| 8536 | float aps = (ang * 65535.0f) / (Game_GetFrameTimecxx . . $ Game_GetFrameTime.() * (2.0f * PIcxx . . $ `fix/fix.h:73:9`!)); |
| 8537 | |
| 8538 | if (aps >= MIN_MALF_SPEEDcxx . . $ `scripts/AIGame.cpp:640:9`!) { |
| 8539 | float tdot = memorycxx . . $ Sparky#memory.->orientcxx . . $ sparky_data#orient..rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(4a721543d64e126a). orient.fveccxx . . $ matrix#fvec.; |
| 8540 | if (tdot < 0.0f) |
| 8541 | spin_dir = SPARKY_ROT_LEFTcxx . . $ `scripts/AIGame.cpp:646:9`!; |
| 8542 | else if (tdot > 0.0f) |
| 8543 | spin_dir = SPARKY_ROT_RIGHTcxx . . $ `scripts/AIGame.cpp:647:9`!; |
| 8544 | else |
| 8545 | spin_dir = SPARKY_NO_ROTcxx . . $ `scripts/AIGame.cpp:645:9`!; |
| 8546 | } else { |
| 8547 | spin_dir = SPARKY_NO_ROTcxx . . $ `scripts/AIGame.cpp:645:9`!; |
| 8548 | } |
| 8549 | |
| 8550 | if (spin_dir == memorycxx . . $ Sparky#memory.->spin_dircxx . . $ sparky_data#spin_dir.) { |
| 8551 | if (spin_dir == SPARKY_NO_ROTcxx . . $ `scripts/AIGame.cpp:645:9`!) |
| 8552 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. = 0.0f; |
| 8553 | else |
| 8554 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8555 | } else { |
| 8556 | memorycxx . . $ Sparky#memory.->spin_dircxx . . $ sparky_data#spin_dir. = spin_dir; |
| 8557 | memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. = 0.0f; |
| 8558 | } |
| 8559 | |
| 8560 | memorycxx . . $ Sparky#memory.->spin_dircxx . . $ sparky_data#spin_dir. = spin_dir; |
| 8561 | memorycxx . . $ Sparky#memory.->orientcxx . . $ sparky_data#orient. =cxx . . $ matrix#`operator=`(4c6f8b29806742). orient; |
| 8562 | |
| 8563 | // mprintf(0, "spin time %f\n", memory->spin_time); |
| 8564 | |
| 8565 | if (memorycxx . . $ Sparky#memory.->spin_timecxx . . $ sparky_data#spin_time. > MALF_TIMEcxx . . $ `scripts/AIGame.cpp:639:9`!) { |
| 8566 | SetModecxx . . $ Sparky#SetMode(5016a63d0a5aceb0).(me, SPARKY_DYINGcxx . . $ `scripts/AIGame.cpp:650:9`!); |
| 8567 | } |
| 8568 | } else { |
| 8569 | if (memorycxx . . $ Sparky#memory.->last_spark_timecxx . . $ sparky_data#last_spark_time. + .1f < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 8570 | memorycxx . . $ Sparky#memory.->last_spark_timecxx . . $ sparky_data#last_spark_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 8571 | |
| 8572 | int room; |
| 8573 | vectorcxx . . $ vector# pos; |
| 8574 | |
| 8575 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8576 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 8577 | |
| 8578 | Game_CreateRandomSparkscxx . . $ Game_CreateRandomSparks(3e6b82e54d72ee3b).(5, &pos, room); |
| 8579 | } |
| 8580 | |
| 8581 | if (memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. < 2.5 && memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 2.5) { |
| 8582 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8583 | |
| 8584 | mstruct.randomcxx . . $ msafe_struct#random. = 21; |
| 8585 | mstruct.is_realcxx . . $ msafe_struct#is_real. = 0; |
| 8586 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 8587 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = 1; |
| 8588 | mstruct.effect_typecxx . . $ msafe_struct#effect_type. = MED_SMOKE_INDEXcxx . . $ `Descent3/fireball_external.h:29:9`!; |
| 8589 | mstruct.phys_infocxx . . $ msafe_struct#phys_info. = 0; |
| 8590 | mstruct.dragcxx . . $ msafe_struct#drag. = .001f; |
| 8591 | mstruct.masscxx . . $ msafe_struct#mass. = .001f; |
| 8592 | mstruct.intervalcxx . . $ msafe_struct#interval. = .05f; |
| 8593 | mstruct.longevitycxx . . $ msafe_struct#longevity. = 100000.0f; |
| 8594 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 1.0; |
| 8595 | mstruct.sizecxx . . $ msafe_struct#size. = 8.0f; |
| 8596 | mstruct.speedcxx . . $ msafe_struct#speed. = 120.0; |
| 8597 | |
| 8598 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!, &mstruct); |
| 8599 | } |
| 8600 | |
| 8601 | if (memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. > DEATH_TIMEcxx . . $ `scripts/AIGame.cpp:642:9`!) { |
| 8602 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 8603 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_MEDIUMcxx . . $ `Descent3/deathinfo_external.h:86:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, |
| 8604 | 0.0f, 0.0f); |
| 8605 | } |
| 8606 | } |
| 8607 | |
| 8608 | memorycxx . . $ Sparky#memory.->mode_timecxx . . $ sparky_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8609 | } |
| 8610 | |
| 8611 | int16_t Sparkycxx . . $ Sparky#::CallEventcxx . . $ Sparky#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 8612 | switch (event) { |
| 8613 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 8614 | DoInitcxx . . $ Sparky#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8615 | break; |
| 8616 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 8617 | DoFramecxx . . $ Sparky#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 8618 | break; |
| 8619 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 8620 | return (DoNotifycxx . . $ Sparky#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 8621 | break; |
| 8622 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 8623 | memorycxx . . $ Sparky#memory. = (sparky_datacxx . . $ sparky_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 8624 | } break; |
| 8625 | } |
| 8626 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 8627 | } |
| 8628 | |
| 8629 | //------------------ |
| 8630 | // Hellion class |
| 8631 | //------------------ |
| 8632 | |
| 8633 | bool Hellioncxx . . $ Hellion#::DoNotifycxx . . $ Hellion#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 8634 | switch (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode.) { |
| 8635 | case HELLION_WAITcxx . . $ `scripts/AIGame.cpp:685:9`!: { |
| 8636 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_STARTcxx . . $ `Descent3/aistruct_external.h:312:9`!) { |
| 8637 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_INTROcxx . . $ `scripts/AIGame.cpp:686:9`!); |
| 8638 | } |
| 8639 | } break; |
| 8640 | case HELLION_INTROcxx . . $ `scripts/AIGame.cpp:686:9`!: { |
| 8641 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!) { |
| 8642 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`!); |
| 8643 | } |
| 8644 | } break; |
| 8645 | } |
| 8646 | |
| 8647 | return true; |
| 8648 | } |
| 8649 | |
| 8650 | void Hellioncxx . . $ Hellion#::RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(int me, float start, float end, float time) { |
| 8651 | memorycxx . . $ Hellion#memory.->alert_startcxx . . $ hellion_data#alert_start. = start; |
| 8652 | memorycxx . . $ Hellion#memory.->alert_endcxx . . $ hellion_data#alert_end. = end; |
| 8653 | memorycxx . . $ Hellion#memory.->alert_timecxx . . $ hellion_data#alert_time. = time; |
| 8654 | |
| 8655 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:646:9`!, &start, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8656 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:647:9`!, &end, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8657 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:648:9`!, &time, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8658 | } |
| 8659 | |
| 8660 | void Hellioncxx . . $ Hellion#::RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(int me, float start, float fire, int fire_sound, float end, float time, float latency, int index, |
| 8661 | uint16_tcxx . . $ uint16_t# w_id, char f_mask) { |
| 8662 | memorycxx . . $ Hellion#memory.->startcxx . . $ hellion_data#start. = start; |
| 8663 | memorycxx . . $ Hellion#memory.->firecxx . . $ hellion_data#fire. = fire; |
| 8664 | memorycxx . . $ Hellion#memory.->endcxx . . $ hellion_data#end. = end; |
| 8665 | memorycxx . . $ Hellion#memory.->timecxx . . $ hellion_data#time. = time; |
| 8666 | memorycxx . . $ Hellion#memory.->latencycxx . . $ hellion_data#latency. = latency; |
| 8667 | memorycxx . . $ Hellion#memory.->indexcxx . . $ hellion_data#index. = index; |
| 8668 | memorycxx . . $ Hellion#memory.->f_maskcxx . . $ hellion_data#f_mask. = f_mask; |
| 8669 | |
| 8670 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:674:9`!, &start, index); |
| 8671 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_ANIM_FIREcxx . . $ `scripts/osiris_common.h:675:9`!, &fire, index); |
| 8672 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_I_FIRE_SOUNDcxx . . $ `scripts/osiris_common.h:671:9`!, &fire_sound, index); |
| 8673 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:676:9`!, &end, index); |
| 8674 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:673:9`!, &time, index); |
| 8675 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!, &latency, index); |
| 8676 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_C_MASKcxx . . $ `scripts/osiris_common.h:670:9`!, &f_mask, 0); |
| 8677 | |
| 8678 | char num_gps; |
| 8679 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBV_C_NUM_GUNPTScxx . . $ `scripts/osiris_common.h:664:9`!, &num_gps); |
| 8680 | |
| 8681 | int i; |
| 8682 | for (i = 0; i < num_gps; i++) { |
| 8683 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, WBSV_US_GUNPT_WEAPON_IDcxx . . $ `scripts/osiris_common.h:665:9`!, &w_id, i); |
| 8684 | } |
| 8685 | } |
| 8686 | |
| 8687 | void Hellioncxx . . $ Hellion#::SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 8688 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 8689 | |
| 8690 | switch (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode.) { |
| 8691 | case HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`!: |
| 8692 | case HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`!: |
| 8693 | case HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`!: |
| 8694 | case HELLION_SLEEPcxx . . $ `scripts/AIGame.cpp:690:9`!: |
| 8695 | memorycxx . . $ Hellion#memory.->next_modecxx . . $ hellion_data#next_mode. = mode; |
| 8696 | mode = HELLION_BETWEEN_MODEcxx . . $ `scripts/AIGame.cpp:693:9`!; |
| 8697 | break; |
| 8698 | } |
| 8699 | |
| 8700 | switch (mode) { |
| 8701 | case HELLION_BETWEEN_MODEcxx . . $ `scripts/AIGame.cpp:693:9`!: { |
| 8702 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 1.0f, 10.0f, 1.0f); |
| 8703 | |
| 8704 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 8705 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 8706 | |
| 8707 | switch (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode.) { |
| 8708 | case HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`!: |
| 8709 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 120.0f, 140.0f, 2.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionMatterToAlert"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8710 | break; |
| 8711 | case HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`!: |
| 8712 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 200.0f, 240.0f, 5.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionEnergyToAlert"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8713 | break; |
| 8714 | case HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`!: |
| 8715 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 62.0f, 80.0f, 2.3f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionNapalmToAlert"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8716 | break; |
| 8717 | case HELLION_SLEEPcxx . . $ `scripts/AIGame.cpp:690:9`!: |
| 8718 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 338.0f, 353.0f, 1.7f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8719 | break; |
| 8720 | } |
| 8721 | } break; |
| 8722 | |
| 8723 | case HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`!: |
| 8724 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 375.0f, 384.0f, 1.0f); |
| 8725 | RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(me, 100.0f, 120.0f, Sound_FindIdcxx . . $ Sound_FindId.("fragA2"), 120.0f, 2.5f, 0.5f, 0, Wpn_FindIDcxx . . $ Wpn_FindID.("HellionFrag"), |
| 8726 | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4)); |
| 8727 | strcpy(memorycxx . . $ Hellion#memory.->soundcxx . . $ hellion_data#sound., "fragA2"); |
| 8728 | strcpy(memorycxx . . $ Hellion#memory.->weaponcxx . . $ hellion_data#weapon., "HellionFrag"); |
| 8729 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 80.0f, 100.0f, 2.7f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionAlertToMatter"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8730 | break; |
| 8731 | case HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`!: |
| 8732 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 360.0f, 369.0f, 1.0f); |
| 8733 | RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(me, 48.0f, 62.0f, -1, 62.0f, 2.0f, 0.1f, 0, -1, 0); |
| 8734 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 10.0f, 48.0f, 5.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionAlertToNapalm"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8735 | break; |
| 8736 | case HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`!: |
| 8737 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 390.0f, 400.0f, 1.0f); |
| 8738 | RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(me, 179.0f, 200.0f, Sound_FindIdcxx . . $ Sound_FindId.("Mega missile fire"), 200.0f, 2.7f, 0.9f, 0, Wpn_FindIDcxx . . $ Wpn_FindID.("HellionMega"), |
| 8739 | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4)); |
| 8740 | strcpy(memorycxx . . $ Hellion#memory.->soundcxx . . $ hellion_data#sound., "Mega missile fire"); |
| 8741 | strcpy(memorycxx . . $ Hellion#memory.->weaponcxx . . $ hellion_data#weapon., "HellionMega"); |
| 8742 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 140.0f, 179.0f, 5.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionAlertToEnergy"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8743 | break; |
| 8744 | case HELLION_SLEEPcxx . . $ `scripts/AIGame.cpp:690:9`!: |
| 8745 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 271.0f, 289.0f, 2.5); |
| 8746 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 240.0f, 271.0f, 4.0f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8747 | break; |
| 8748 | case HELLION_BIRTHINGcxx . . $ `scripts/AIGame.cpp:691:9`!: |
| 8749 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 289.0f, 338.0f, 6.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8750 | break; |
| 8751 | case HELLION_DEATHcxx . . $ `scripts/AIGame.cpp:692:9`!: { |
| 8752 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`! | AIF_DISABLE_MELEEcxx . . $ `Descent3/aistruct_external.h:375:9`!; |
| 8753 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 8754 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 8755 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 8756 | |
| 8757 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 8758 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 8759 | |
| 8760 | float circle_dist = -1.0f; |
| 8761 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:512:9`!, &circle_dist); |
| 8762 | |
| 8763 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 495.0f, 650.0f, 15.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionDeath"), -1); |
| 8764 | } break; |
| 8765 | default: |
| 8766 | break; |
| 8767 | } |
| 8768 | |
| 8769 | memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. = 0.0f; |
| 8770 | memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. = mode; |
| 8771 | } |
| 8772 | |
| 8773 | void Hellioncxx . . $ Hellion#::DoInitcxx . . $ Hellion#DoInit(d4f767463ce0a6b3).(int me) { |
| 8774 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 8775 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 8776 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(hellion_datacxx . . $ hellion_data#); |
| 8777 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 8778 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 8779 | int i; |
| 8780 | |
| 8781 | memorycxx . . $ Hellion#memory. = (hellion_datacxx . . $ hellion_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 8782 | memorycxx . . $ Hellion#memory.->flagscxx . . $ hellion_data#flags. = 0; |
| 8783 | memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. = HELLION_WAITcxx . . $ `scripts/AIGame.cpp:685:9`!; |
| 8784 | |
| 8785 | memorycxx . . $ Hellion#memory.->head_objectcxx . . $ hellion_data#head_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Hellionhead", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 0, 0, true, true); |
| 8786 | memorycxx . . $ Hellion#memory.->turret_objectcxx . . $ hellion_data#turret_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Hellionturret", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 1, 0, true, true); |
| 8787 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(me, 1.0f, 10.0f, 1.0f); |
| 8788 | |
| 8789 | int proom; |
| 8790 | vectorcxx . . $ vector# ppos; |
| 8791 | matrixcxx . . $ matrix# porient; |
| 8792 | |
| 8793 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &proom); |
| 8794 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ppos); |
| 8795 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &porient); |
| 8796 | |
| 8797 | for (i = 0; i < 2; i++) { |
| 8798 | memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i] = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("Invisiblepowerup"), proom, &ppos, &porient, me); |
| 8799 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8800 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i]; |
| 8801 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!, &mstruct); |
| 8802 | |
| 8803 | memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "STEmitter", OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, 2 + i, 0, true, true); |
| 8804 | } |
| 8805 | |
| 8806 | memorycxx . . $ Hellion#memory.->laser_soundcxx . . $ hellion_data#laser_sound. = -1; |
| 8807 | memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. = 0.0f; |
| 8808 | memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. = 0.0f; |
| 8809 | |
| 8810 | // Save and restore information |
| 8811 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:646:9`!, &memorycxx . . $ Hellion#memory.->alert_startcxx . . $ hellion_data#alert_start., AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8812 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:647:9`!, &memorycxx . . $ Hellion#memory.->alert_endcxx . . $ hellion_data#alert_end., AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8813 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:648:9`!, &memorycxx . . $ Hellion#memory.->alert_timecxx . . $ hellion_data#alert_time., AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 8814 | |
| 8815 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_F_ANIM_STARTcxx . . $ `scripts/osiris_common.h:674:9`!, &memorycxx . . $ Hellion#memory.->startcxx . . $ hellion_data#start., 0); |
| 8816 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_F_ANIM_FIREcxx . . $ `scripts/osiris_common.h:675:9`!, &memorycxx . . $ Hellion#memory.->firecxx . . $ hellion_data#fire., 0); |
| 8817 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_F_ANIM_ENDcxx . . $ `scripts/osiris_common.h:676:9`!, &memorycxx . . $ Hellion#memory.->endcxx . . $ hellion_data#end., 0); |
| 8818 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_F_ANIM_TIMEcxx . . $ `scripts/osiris_common.h:673:9`!, &memorycxx . . $ Hellion#memory.->timecxx . . $ hellion_data#time., 0); |
| 8819 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_F_LATENCYcxx . . $ `scripts/osiris_common.h:672:9`!, &memorycxx . . $ Hellion#memory.->latencycxx . . $ hellion_data#latency., 0); |
| 8820 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 0, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, WBSV_C_MASKcxx . . $ `scripts/osiris_common.h:670:9`!, &memorycxx . . $ Hellion#memory.->f_maskcxx . . $ hellion_data#f_mask., 0); |
| 8821 | memorycxx . . $ Hellion#memory.->indexcxx . . $ hellion_data#index. = 0; |
| 8822 | |
| 8823 | strcpy(memorycxx . . $ Hellion#memory.->soundcxx . . $ hellion_data#sound., "fragA2"); |
| 8824 | strcpy(memorycxx . . $ Hellion#memory.->weaponcxx . . $ hellion_data#weapon., "HellionFrag"); |
| 8825 | // end of save and restore info |
| 8826 | |
| 8827 | int flags = AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 8828 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 8829 | |
| 8830 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_WAITcxx . . $ `scripts/AIGame.cpp:685:9`!); |
| 8831 | } |
| 8832 | |
| 8833 | void Hellioncxx . . $ Hellion#::DoFramecxx . . $ Hellion#DoFrame(d4f767463ce0a6b3).(int me) { |
| 8834 | int flags; |
| 8835 | float frame; |
| 8836 | float shields; |
| 8837 | |
| 8838 | char anim_type; |
| 8839 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:520:9`!, &anim_type); |
| 8840 | |
| 8841 | bool f_ok_to_animate = (anim_type != AS_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:442:9`! && anim_type != AS_MELEE1cxx . . $ `Descent3/aistruct_external.h:415:9`! && anim_type != AS_MELEE2cxx . . $ `Descent3/aistruct_external.h:417:9`!); |
| 8842 | |
| 8843 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->head_objectcxx . . $ hellion_data#head_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 8844 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_ANIM_FRAMEcxx . . $ `scripts/osiris_common.h:643:9`!, &frame); |
| 8845 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->head_objectcxx . . $ hellion_data#head_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 8846 | |
| 8847 | // Matter fire animation sound |
| 8848 | if ((memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. < 100.0f || memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. > 120.0f) && frame >= 100.0f && frame <= 120.0f) { |
| 8849 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionMatterAttack")); |
| 8850 | } |
| 8851 | |
| 8852 | if (memorycxx . . $ Hellion#memory.->laser_soundcxx . . $ hellion_data#laser_sound. != -1 && (frame < 48.0f || frame > 60.0f)) { |
| 8853 | memorycxx . . $ Hellion#memory.->laser_soundcxx . . $ hellion_data#laser_sound. = -1; |
| 8854 | } |
| 8855 | |
| 8856 | // Laser firing sound |
| 8857 | if (frame >= 48.0f && frame <= 60.0f && memorycxx . . $ Hellion#memory.->laser_soundcxx . . $ hellion_data#laser_sound. == -1) { |
| 8858 | memorycxx . . $ Hellion#memory.->laser_soundcxx . . $ hellion_data#laser_sound. = Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("RbtHellionLaser")); |
| 8859 | } |
| 8860 | |
| 8861 | int cur_mtype; |
| 8862 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &cur_mtype); |
| 8863 | |
| 8864 | if (cur_mtype == MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`! && frame >= 140.0 && frame <= 179.0f) { |
| 8865 | char mtype = MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!; |
| 8866 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &mtype); |
| 8867 | } else if (cur_mtype == MT_NONEcxx . . $ `Descent3/object_external.h:233:9`!) { |
| 8868 | char mtype = MT_PHYSICScxx . . $ `Descent3/object_external.h:234:9`!; |
| 8869 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_C_MOVEMENT_TYPEcxx . . $ `scripts/osiris_common.h:638:9`!, &mtype); |
| 8870 | } |
| 8871 | |
| 8872 | if (memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. >= 140.0f && memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. <= 179.0f && memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. < 146.0f && frame >= 146.0f) { |
| 8873 | matrixcxx . . $ matrix# orient; |
| 8874 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 8875 | |
| 8876 | int room; |
| 8877 | vectorcxx . . $ vector# pos; |
| 8878 | int weapon_id; |
| 8879 | |
| 8880 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 8881 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 8882 | |
| 8883 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.uveccxx . . $ matrix#uvec. *cxx . . $ `operator*`(252247219a31502c). 10.0f; |
| 8884 | |
| 8885 | matrixcxx . . $ matrix# new_orient; |
| 8886 | |
| 8887 | new_orient.fveccxx . . $ matrix#fvec. =cxx . . $ vector#`operator=`(c0842353a20857d). -cxx . . $ operator-(9e07539e219c6f20).orient.uveccxx . . $ matrix#uvec.; |
| 8888 | new_orient.rveccxx . . $ matrix#rvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.rveccxx . . $ matrix#rvec.; |
| 8889 | new_orient.uveccxx . . $ matrix#uvec. =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). orient.fveccxx . . $ matrix#fvec.; |
| 8890 | |
| 8891 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("HellionBShark"); |
| 8892 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, &new_orient, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 8893 | } |
| 8894 | |
| 8895 | if (memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. >= 140.0f && memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. <= 179.0f && memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. < 160.0f && frame >= 160.0f) { |
| 8896 | // shake players |
| 8897 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8898 | mstruct.amountcxx . . $ msafe_struct#amount. = 65.0f; |
| 8899 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_VIEWER_SHAKEcxx . . $ `scripts/osiris_common.h:843:9`!, &mstruct); |
| 8900 | } |
| 8901 | |
| 8902 | if (memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. > 0.0f) { |
| 8903 | int i; |
| 8904 | ray_infocxx . . $ ray_info# ray; |
| 8905 | |
| 8906 | memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8907 | if (memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. < 0.0f) { |
| 8908 | memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. = 0.0f; |
| 8909 | } |
| 8910 | |
| 8911 | vectorcxx . . $ vector# normal; |
| 8912 | vectorcxx . . $ vector# pos; |
| 8913 | int room; |
| 8914 | vectorcxx . . $ vector# end_pos; |
| 8915 | |
| 8916 | for (i = 0; i < 2; i++) { |
| 8917 | int my_room; |
| 8918 | vectorcxx . . $ vector# my_pos; |
| 8919 | |
| 8920 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &my_pos); |
| 8921 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &my_room); |
| 8922 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, i + 1, &pos, &normal); |
| 8923 | |
| 8924 | int rfate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &my_pos, &pos, my_room, 0.0f, 0, &ray); |
| 8925 | room = ray.hit_roomcxx . . $ ray_info#hit_room.; |
| 8926 | |
| 8927 | matrixcxx . . $ matrix# orient; |
| 8928 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 8929 | |
| 8930 | // Determine real start pos - room |
| 8931 | vectorcxx . . $ vector# end_pos = pos; |
| 8932 | end_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). normal *cxx . . $ `operator*`(252247219a31502c). 2000.0f; |
| 8933 | |
| 8934 | int fvi_flags = FQ_CHECK_OBJScxx . . $ `lib/findintersection_external.h:59:9`! | FQ_IGNORE_POWERUPScxx . . $ `lib/findintersection_external.h:62:9`! | FQ_IGNORE_WEAPONScxx . . $ `lib/findintersection_external.h:79:9`!; |
| 8935 | int fate = FVI_RayCastcxx . . $ FVI_RayCast.(me, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); |
| 8936 | |
| 8937 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ray.hit_pointcxx . . $ ray_info#hit_point.); |
| 8938 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i], VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &ray.hit_roomcxx . . $ ray_info#hit_room.); |
| 8939 | |
| 8940 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8941 | |
| 8942 | mstruct.randomcxx . . $ msafe_struct#random. = 21; |
| 8943 | mstruct.is_realcxx . . $ msafe_struct#is_real. = 0; |
| 8944 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i]; |
| 8945 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = -1; |
| 8946 | mstruct.effect_typecxx . . $ msafe_struct#effect_type. = SNOWFLAKE_INDEXcxx . . $ `Descent3/fireball_external.h:61:9`!; |
| 8947 | mstruct.phys_infocxx . . $ msafe_struct#phys_info. = 0; |
| 8948 | mstruct.dragcxx . . $ msafe_struct#drag. = .001f; |
| 8949 | mstruct.masscxx . . $ msafe_struct#mass. = .001f; |
| 8950 | mstruct.intervalcxx . . $ msafe_struct#interval. = .05f; |
| 8951 | mstruct.longevitycxx . . $ msafe_struct#longevity. = .1f; |
| 8952 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = .1f; |
| 8953 | mstruct.sizecxx . . $ msafe_struct#size. = 5.0f; |
| 8954 | mstruct.speedcxx . . $ msafe_struct#speed. = 80.0; |
| 8955 | |
| 8956 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!, &mstruct); |
| 8957 | |
| 8958 | if (fate == HIT_OBJECTcxx . . $ `lib/findintersection_external.h:47:9`! || fate == HIT_SPHERE_2_POLY_OBJECTcxx . . $ `lib/findintersection_external.h:52:9`!) { |
| 8959 | int type; |
| 8960 | |
| 8961 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(ray.hit_objectcxx . . $ ray_info#hit_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 8962 | |
| 8963 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 8964 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8965 | |
| 8966 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = ray.hit_objectcxx . . $ ray_info#hit_object.; |
| 8967 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = me; |
| 8968 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = PD_ENERGY_WEAPONcxx . . $ `Descent3/damage_external.h:24:9`!; |
| 8969 | mstruct.amountcxx . . $ msafe_struct#amount. = 30.0f * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 8970 | |
| 8971 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 8972 | } |
| 8973 | } |
| 8974 | } |
| 8975 | } |
| 8976 | |
| 8977 | // Start up the beem! |
| 8978 | if (frame >= 49.0f && frame <= 55.0f && memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. == 0.0f) { |
| 8979 | memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left. = 1.8f; |
| 8980 | int i; |
| 8981 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 8982 | |
| 8983 | for (i = 0; i < 2; i++) { |
| 8984 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &mstruct.roomnumcxx . . $ msafe_struct#roomnum.); |
| 8985 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.poscxx . . $ msafe_struct#pos.); |
| 8986 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &mstruct.pos2cxx . . $ msafe_struct#pos2.); |
| 8987 | |
| 8988 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[i]; |
| 8989 | mstruct.ithandlecxx . . $ msafe_struct#ithandle. = memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i]; |
| 8990 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left.; |
| 8991 | mstruct.sizecxx . . $ msafe_struct#size. = 3.0f; |
| 8992 | |
| 8993 | mstruct.intervalcxx . . $ msafe_struct#interval. = 1.0f; |
| 8994 | mstruct.countcxx . . $ msafe_struct#count. = 2; |
| 8995 | mstruct.indexcxx . . $ msafe_struct#index. = 1; |
| 8996 | mstruct.texnumcxx . . $ msafe_struct#texnum. = Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("HellionBeam"); |
| 8997 | mstruct.colorcxx . . $ msafe_struct#color. = ((128 >> 3) << 10) | ((128 >> 3) << 5) | (128 >> 3); |
| 8998 | |
| 8999 | mstruct.statecxx . . $ msafe_struct#state. = 1; |
| 9000 | mstruct.flagscxx . . $ msafe_struct#flags. = 0; |
| 9001 | |
| 9002 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_WEATHER_LIGHTNING_BOLTcxx . . $ `scripts/osiris_common.h:863:9`!, &mstruct); |
| 9003 | |
| 9004 | mstruct.randomcxx . . $ msafe_struct#random. = 21; |
| 9005 | mstruct.is_realcxx . . $ msafe_struct#is_real. = 0; |
| 9006 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 9007 | mstruct.gunpointcxx . . $ msafe_struct#gunpoint. = 1 + i; |
| 9008 | mstruct.effect_typecxx . . $ msafe_struct#effect_type. = MED_SMOKE_INDEXcxx . . $ `Descent3/fireball_external.h:29:9`!; |
| 9009 | mstruct.phys_infocxx . . $ msafe_struct#phys_info. = 0; |
| 9010 | mstruct.dragcxx . . $ msafe_struct#drag. = .001f; |
| 9011 | mstruct.masscxx . . $ msafe_struct#mass. = .001f; |
| 9012 | mstruct.intervalcxx . . $ msafe_struct#interval. = .05f; |
| 9013 | mstruct.longevitycxx . . $ msafe_struct#longevity. = memorycxx . . $ Hellion#memory.->laser_time_leftcxx . . $ hellion_data#laser_time_left.; |
| 9014 | mstruct.lifetimecxx . . $ msafe_struct#lifetime. = 1.0; |
| 9015 | mstruct.sizecxx . . $ msafe_struct#size. = 5.0f; |
| 9016 | mstruct.speedcxx . . $ msafe_struct#speed. = 80.0; |
| 9017 | |
| 9018 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_START_SPEWcxx . . $ `scripts/osiris_common.h:815:9`!, &mstruct); |
| 9019 | } |
| 9020 | } |
| 9021 | |
| 9022 | if ((memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. != HELLION_DEATHcxx . . $ `scripts/AIGame.cpp:692:9`!) && (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!)) { |
| 9023 | if (f_ok_to_animate) { |
| 9024 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_DEATHcxx . . $ `scripts/AIGame.cpp:692:9`!); |
| 9025 | } |
| 9026 | } |
| 9027 | |
| 9028 | if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_WAITcxx . . $ `scripts/AIGame.cpp:685:9`!) { |
| 9029 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_INTROcxx . . $ `scripts/AIGame.cpp:686:9`!) { |
| 9030 | if (memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. < 0.5f && memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 0.5f) { |
| 9031 | int flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`!; |
| 9032 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 9033 | |
| 9034 | float awareness = AWARE_FULLYcxx . . $ `Descent3/aistruct_external.h:323:9`!; |
| 9035 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 9036 | |
| 9037 | aDestroyAllRobotsInitcxx . . $ aDestroyAllRobotsInit(49f6e7a06ebc5aa8).(); |
| 9038 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(me); |
| 9039 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ Hellion#memory.->turret_objectcxx . . $ hellion_data#turret_object.); |
| 9040 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ Hellion#memory.->head_objectcxx . . $ hellion_data#head_object.); |
| 9041 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[0]); |
| 9042 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[1]); |
| 9043 | aDestroyAllRobotsEndcxx . . $ aDestroyAllRobotsEnd(49f6e7a06ebc5aa8).(); |
| 9044 | } |
| 9045 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_BETWEEN_MODEcxx . . $ `scripts/AIGame.cpp:693:9`!) { |
| 9046 | if (frame >= 0.0f && frame <= 10.0f) { |
| 9047 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, memorycxx . . $ Hellion#memory.->next_modecxx . . $ hellion_data#next_mode.); |
| 9048 | } |
| 9049 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_DEATHcxx . . $ `scripts/AIGame.cpp:692:9`!) { |
| 9050 | if (memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. < 10.0f && memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 10.0f) { |
| 9051 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 9052 | } |
| 9053 | |
| 9054 | if (frame == 650.0f) { |
| 9055 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 9056 | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_CONTACT_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:93:9`! | |
| 9057 | DF_CONTACT_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:94:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`! | DF_DEBRIS_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:101:9`! | DF_DEBRIS_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:102:9`!, |
| 9058 | 0.0f, 0.0f); |
| 9059 | } |
| 9060 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`!) { |
| 9061 | if (frame >= 375.0f && frame <= 384.0f) { |
| 9062 | int flags = AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 9063 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 9064 | |
| 9065 | flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 9066 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 9067 | } |
| 9068 | |
| 9069 | if (shields < 4000.0f) { |
| 9070 | if (f_ok_to_animate) { |
| 9071 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`!); |
| 9072 | } |
| 9073 | } |
| 9074 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`!) { |
| 9075 | if (frame >= 360.0f && frame <= 369.0f) { |
| 9076 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 9077 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 9078 | } |
| 9079 | |
| 9080 | if (shields < 2100.0f) { |
| 9081 | if (f_ok_to_animate) { |
| 9082 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`!); |
| 9083 | } |
| 9084 | } |
| 9085 | } else if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`!) { |
| 9086 | if (frame >= 390.0f && frame <= 400.0f) { |
| 9087 | int test_flags; |
| 9088 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &test_flags); |
| 9089 | |
| 9090 | if (test_flags & AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!) { |
| 9091 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 9092 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 9093 | |
| 9094 | /* int room; |
| 9095 | vector pos; |
| 9096 | int weapon_id; |
| 9097 | |
| 9098 | Obj_Value(me, VF_GET, OBJV_I_ROOMNUM, &room); |
| 9099 | Obj_Value(me, VF_GET, OBJV_V_POS, &pos); |
| 9100 | |
| 9101 | weapon_id = Wpn_FindID("HellionBShark"); |
| 9102 | Obj_Create(OBJ_WEAPON, weapon_id, room, &pos, NULL, NULL);*/ |
| 9103 | } |
| 9104 | } |
| 9105 | } |
| 9106 | // else if(memory->mode == HELLION_SLEEP) |
| 9107 | // { |
| 9108 | // int offset = (memory->mode - HELLION_MATTER + 1)%4; |
| 9109 | // SetMode(me, HELLION_MATTER + offset); |
| 9110 | // } |
| 9111 | else if (memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. > 20.0f) { |
| 9112 | if (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`! || memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_ENERGYcxx . . $ `scripts/AIGame.cpp:688:9`! || memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_FIREcxx . . $ `scripts/AIGame.cpp:689:9`! || |
| 9113 | memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. == HELLION_SLEEPcxx . . $ `scripts/AIGame.cpp:690:9`!) { |
| 9114 | int offset = (memorycxx . . $ Hellion#memory.->modecxx . . $ hellion_data#mode. - HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`! + 1) % 4; |
| 9115 | SetModecxx . . $ Hellion#SetMode(5016a63d0a5aceb0).(me, HELLION_MATTERcxx . . $ `scripts/AIGame.cpp:687:9`! + offset); |
| 9116 | } |
| 9117 | } |
| 9118 | |
| 9119 | memorycxx . . $ Hellion#memory.->mode_timecxx . . $ hellion_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 9120 | memorycxx . . $ Hellion#memory.->last_framecxx . . $ hellion_data#last_frame. = frame; |
| 9121 | } |
| 9122 | |
| 9123 | int16_t Hellioncxx . . $ Hellion#::CallEventcxx . . $ Hellion#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 9124 | switch (event) { |
| 9125 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 9126 | DoInitcxx . . $ Hellion#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9127 | break; |
| 9128 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 9129 | DoFramecxx . . $ Hellion#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9130 | break; |
| 9131 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 9132 | return (DoNotifycxx . . $ Hellion#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 9133 | break; |
| 9134 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 9135 | // shake players |
| 9136 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 9137 | mstruct.amountcxx . . $ msafe_struct#amount. = 90.0f; |
| 9138 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_VIEWER_SHAKEcxx . . $ `scripts/osiris_common.h:843:9`!, &mstruct); |
| 9139 | |
| 9140 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Hellion#memory.->head_objectcxx . . $ hellion_data#head_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 9141 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, 0.0f, |
| 9142 | 0.0f); |
| 9143 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ Hellion#memory.->turret_objectcxx . . $ hellion_data#turret_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 9144 | DF_BLAST_RINGcxx . . $ `Descent3/deathinfo_external.h:79:9`! | DF_LOSES_ANTIGRAVcxx . . $ `Descent3/deathinfo_external.h:81:9`! | DF_EXPL_LARGEcxx . . $ `Descent3/deathinfo_external.h:87:9`! | DF_FIREBALLcxx . . $ `Descent3/deathinfo_external.h:77:9`! | DF_BREAKS_APARTcxx . . $ `Descent3/deathinfo_external.h:78:9`! | DF_DEBRIS_SMOKEScxx . . $ `Descent3/deathinfo_external.h:98:9`!, 0.0f, |
| 9145 | 0.0f); |
| 9146 | |
| 9147 | int i; |
| 9148 | msafe_structcxx . . $ msafe_struct# mo; |
| 9149 | |
| 9150 | for (i = 0; i < 2; i++) { |
| 9151 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Hellion#memory.->cameracxx . . $ hellion_data#camera.[i]; |
| 9152 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 9153 | |
| 9154 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ Hellion#memory.->emittercxx . . $ hellion_data#emitter.[i]; |
| 9155 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 9156 | } |
| 9157 | } break; |
| 9158 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 9159 | memorycxx . . $ Hellion#memory. = (hellion_datacxx . . $ hellion_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 9160 | |
| 9161 | uint16_tcxx . . $ uint16_t# wpn = Wpn_FindIDcxx . . $ Wpn_FindID.(memorycxx . . $ Hellion#memory.->weaponcxx . . $ hellion_data#weapon.); |
| 9162 | int snd = Sound_FindIdcxx . . $ Sound_FindId.(memorycxx . . $ Hellion#memory.->soundcxx . . $ hellion_data#sound.); |
| 9163 | |
| 9164 | RemapAlertcxx . . $ Hellion#RemapAlert(a8f6e5be37b619e5).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., memorycxx . . $ Hellion#memory.->alert_startcxx . . $ hellion_data#alert_start., memorycxx . . $ Hellion#memory.->alert_endcxx . . $ hellion_data#alert_end., memorycxx . . $ Hellion#memory.->alert_timecxx . . $ hellion_data#alert_time.); |
| 9165 | RemapWBcxx . . $ Hellion#RemapWB(59a4a0e53ea920b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., memorycxx . . $ Hellion#memory.->startcxx . . $ hellion_data#start., memorycxx . . $ Hellion#memory.->firecxx . . $ hellion_data#fire., snd, memorycxx . . $ Hellion#memory.->endcxx . . $ hellion_data#end., memorycxx . . $ Hellion#memory.->timecxx . . $ hellion_data#time., memorycxx . . $ Hellion#memory.->latencycxx . . $ hellion_data#latency., |
| 9166 | memorycxx . . $ Hellion#memory.->indexcxx . . $ hellion_data#index., wpn, memorycxx . . $ Hellion#memory.->f_maskcxx . . $ hellion_data#f_mask.); |
| 9167 | } break; |
| 9168 | } |
| 9169 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 9170 | } |
| 9171 | |
| 9172 | //------------------ |
| 9173 | // MantaRay class |
| 9174 | //------------------ |
| 9175 | |
| 9176 | bool MantaRaycxx . . $ MantaRay#::SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr) { |
| 9177 | gb_comcxx . . $ gb_com# com; |
| 9178 | |
| 9179 | com.actioncxx . . $ gb_com#action. = command; |
| 9180 | com.ptrcxx . . $ gb_com#ptr. = ptr; |
| 9181 | |
| 9182 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 9183 | |
| 9184 | ei.me_handlecxx . . $ tOSIRISEventInfo#me_handle. = it; |
| 9185 | ei.extra_infocxx . . $ tOSIRISEventInfo#extra_info. = (void *)&com; |
| 9186 | ei.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. = AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!; |
| 9187 | ei.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle. = me; |
| 9188 | |
| 9189 | return Obj_CallEventcxx . . $ Obj_CallEvent.(it, EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!, &ei); |
| 9190 | } |
| 9191 | |
| 9192 | bool MantaRaycxx . . $ MantaRay#::ReceiveCommandcxx . . $ MantaRay#ReceiveCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr) { |
| 9193 | switch (command) { |
| 9194 | case MRC_JOIN_MEcxx . . $ `scripts/AIGame.cpp:759:9`!: { |
| 9195 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. == 0) { |
| 9196 | memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle. = it; |
| 9197 | memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. |= MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!; |
| 9198 | |
| 9199 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, memorycxx . . $ MantaRay#memory.->modecxx . . $ mantaray_data#mode.); |
| 9200 | |
| 9201 | return true; |
| 9202 | } |
| 9203 | } break; |
| 9204 | case MRC_LEAVE_YOUcxx . . $ `scripts/AIGame.cpp:760:9`!: |
| 9205 | break; |
| 9206 | case MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!: { |
| 9207 | int i; |
| 9208 | for (i = 0; i < memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates.; i++) { |
| 9209 | if (memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[i] == it) { |
| 9210 | vectorcxx . . $ vector# goal_pos; |
| 9211 | matrixcxx . . $ matrix# orient; |
| 9212 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &goal_pos); |
| 9213 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 9214 | |
| 9215 | switch (i) { |
| 9216 | case 0: |
| 9217 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`!; |
| 9218 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`!; |
| 9219 | break; |
| 9220 | case 1: |
| 9221 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`!; |
| 9222 | goal_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`!; |
| 9223 | break; |
| 9224 | case 2: |
| 9225 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9226 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9227 | break; |
| 9228 | case 3: |
| 9229 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9230 | goal_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9231 | break; |
| 9232 | } |
| 9233 | |
| 9234 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). goal_pos; |
| 9235 | return true; |
| 9236 | } |
| 9237 | } |
| 9238 | } break; |
| 9239 | case MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!: { |
| 9240 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, (int *)ptr); |
| 9241 | return true; |
| 9242 | } break; |
| 9243 | case MRC_GET_GOAL_ORIENTcxx . . $ `scripts/AIGame.cpp:763:9`!: { |
| 9244 | return true; |
| 9245 | } break; |
| 9246 | } |
| 9247 | |
| 9248 | // mprintf(0, "MantaRay action %d failed\n"); |
| 9249 | return false; |
| 9250 | } |
| 9251 | |
| 9252 | void MantaRaycxx . . $ MantaRay#::UpdateSquadListcxx . . $ MantaRay#UpdateSquadList(d4f767463ce0a6b3).(int me) { |
| 9253 | int i; |
| 9254 | |
| 9255 | for (i = 0; i < memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates.; i++) { |
| 9256 | int type; |
| 9257 | int j; |
| 9258 | |
| 9259 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9260 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 9261 | for (j = i; j < memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates. - 1; j++) { |
| 9262 | memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[j] = memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[j + 1]; |
| 9263 | } |
| 9264 | |
| 9265 | memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates.--; |
| 9266 | i--; |
| 9267 | } |
| 9268 | } |
| 9269 | } |
| 9270 | |
| 9271 | void MantaRaycxx . . $ MantaRay#::UpdateSquadcxx . . $ MantaRay#UpdateSquad(d4f767463ce0a6b3).(int me) { |
| 9272 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) |
| 9273 | return; |
| 9274 | |
| 9275 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!) { |
| 9276 | UpdateSquadListcxx . . $ MantaRay#UpdateSquadList(d4f767463ce0a6b3).(me); |
| 9277 | |
| 9278 | if (memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates. == 0) |
| 9279 | memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. &= ~MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!; |
| 9280 | |
| 9281 | if (memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates. >= MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!) |
| 9282 | return; |
| 9283 | } |
| 9284 | |
| 9285 | int scan_objs[25]; |
| 9286 | int n_scan; |
| 9287 | int room; |
| 9288 | vectorcxx . . $ vector# pos; |
| 9289 | int i; |
| 9290 | |
| 9291 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 9292 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 9293 | |
| 9294 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 200.0f, scan_objs, 25, false, true, false, true); |
| 9295 | |
| 9296 | for (i = 0; i < n_scan; i++) { |
| 9297 | uint16_tcxx . . $ uint16_t# id; |
| 9298 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 9299 | |
| 9300 | // this is more rare than the types matching; so, do it first |
| 9301 | if (id == memorycxx . . $ MantaRay#memory.->mantaray_idcxx . . $ mantaray_data#mantaray_id.) { |
| 9302 | int type; |
| 9303 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9304 | if (type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! && scan_objs[i] != me) { |
| 9305 | bool f_on_team = false; |
| 9306 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!) { |
| 9307 | int j; |
| 9308 | for (j = 0; j < memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates.; j++) { |
| 9309 | if (scan_objs[i] == memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[j]) { |
| 9310 | f_on_team = true; |
| 9311 | break; |
| 9312 | } |
| 9313 | } |
| 9314 | } |
| 9315 | |
| 9316 | if (!f_on_team) { |
| 9317 | if (SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(me, scan_objs[i], MRC_JOIN_MEcxx . . $ `scripts/AIGame.cpp:759:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)) { |
| 9318 | memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. |= MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!; |
| 9319 | memorycxx . . $ MantaRay#memory.->teammatecxx . . $ mantaray_data#teammate.[memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates.++] = scan_objs[i]; |
| 9320 | } |
| 9321 | } |
| 9322 | } |
| 9323 | } |
| 9324 | |
| 9325 | if (memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates. >= MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!) |
| 9326 | return; |
| 9327 | } |
| 9328 | } |
| 9329 | |
| 9330 | void MantaRaycxx . . $ MantaRay#::DoInitcxx . . $ MantaRay#DoInit(d4f767463ce0a6b3).(int me) { |
| 9331 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 9332 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 9333 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(mantaray_datacxx . . $ mantaray_data#); |
| 9334 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 9335 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 9336 | |
| 9337 | memorycxx . . $ MantaRay#memory. = (mantaray_datacxx . . $ mantaray_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 9338 | |
| 9339 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ MantaRay#memory.->base_speedcxx . . $ mantaray_data#base_speed.); |
| 9340 | memorycxx . . $ MantaRay#memory.->attack_speedcxx . . $ mantaray_data#attack_speed. = 1.8f * memorycxx . . $ MantaRay#memory.->base_speedcxx . . $ mantaray_data#base_speed.; |
| 9341 | |
| 9342 | memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. = 0; |
| 9343 | memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9344 | memorycxx . . $ MantaRay#memory.->num_teammatescxx . . $ mantaray_data#num_teammates. = 0; |
| 9345 | |
| 9346 | // .1 to .6 seconds into the level, do the first matching |
| 9347 | memorycxx . . $ MantaRay#memory.->next_update_squad_timecxx . . $ mantaray_data#next_update_squad_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * .5f + 0.1f; |
| 9348 | |
| 9349 | memorycxx . . $ MantaRay#memory.->mantaray_idcxx . . $ mantaray_data#mantaray_id. = Obj_FindIDcxx . . $ Obj_FindID.("Manta Ray"); |
| 9350 | |
| 9351 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9352 | } |
| 9353 | |
| 9354 | void MantaRaycxx . . $ MantaRay#::SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 9355 | int f_attack_flags = (AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!); |
| 9356 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 9357 | |
| 9358 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) { |
| 9359 | // The leader is alive; so, get my new goal pos |
| 9360 | SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos.); |
| 9361 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_V_POScxx . . $ `scripts/osiris_common.h:578:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos.); |
| 9362 | SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!, &memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9363 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:572:9`!, &memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9364 | |
| 9365 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 2, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos., |
| 9366 | memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9367 | float cd = .1f; |
| 9368 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &cd); |
| 9369 | } else { |
| 9370 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ MantaRay#memory.->base_speedcxx . . $ mantaray_data#base_speed.); |
| 9371 | } |
| 9372 | |
| 9373 | switch (mode) { |
| 9374 | case MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!: { |
| 9375 | vectorcxx . . $ vector# pos; |
| 9376 | int room = 0; |
| 9377 | float dist = 15.0f; |
| 9378 | |
| 9379 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9380 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &pos, |
| 9381 | room); |
| 9382 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9383 | } break; |
| 9384 | |
| 9385 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: { |
| 9386 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9387 | |
| 9388 | // memory->next_attack_time = Game_GetTime() + 10.0 * ((float)rand()/(float)RAND_MAX); |
| 9389 | |
| 9390 | float dist = 60.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f; |
| 9391 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, |
| 9392 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | |
| 9393 | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, |
| 9394 | OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9395 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9396 | |
| 9397 | dist = 10.0f; |
| 9398 | int g_index = |
| 9399 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 9400 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9401 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9402 | } break; |
| 9403 | |
| 9404 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: { |
| 9405 | vectorcxx . . $ vector# pos; |
| 9406 | int room = 0; |
| 9407 | |
| 9408 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9409 | |
| 9410 | if (!(memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!)) { |
| 9411 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ MantaRay#memory.->attack_speedcxx . . $ mantaray_data#attack_speed.); |
| 9412 | } |
| 9413 | |
| 9414 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 9415 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 9416 | |
| 9417 | float dist = 10.0f; |
| 9418 | |
| 9419 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, |
| 9420 | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, &pos, room); |
| 9421 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9422 | |
| 9423 | int g_index = |
| 9424 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 9425 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9426 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9427 | } break; |
| 9428 | } |
| 9429 | |
| 9430 | memorycxx . . $ MantaRay#memory.->modecxx . . $ mantaray_data#mode. = mode; |
| 9431 | memorycxx . . $ MantaRay#memory.->mode_timecxx . . $ mantaray_data#mode_time. = 0.0f; |
| 9432 | } |
| 9433 | |
| 9434 | void MantaRaycxx . . $ MantaRay#::DoSquadieFramecxx . . $ MantaRay#DoSquadieFrame(d4f767463ce0a6b3).(int me) { |
| 9435 | int type; |
| 9436 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9437 | |
| 9438 | // Check if the leader is still alive |
| 9439 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 9440 | // Reset the speed |
| 9441 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ MantaRay#memory.->base_speedcxx . . $ mantaray_data#base_speed.); |
| 9442 | |
| 9443 | memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. = 0; |
| 9444 | memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9445 | |
| 9446 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9447 | return; |
| 9448 | } |
| 9449 | |
| 9450 | // The leader is alive; so, get my new goal pos |
| 9451 | SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos.); |
| 9452 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_V_POScxx . . $ `scripts/osiris_common.h:578:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos.); |
| 9453 | SendCommandcxx . . $ MantaRay#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!, &memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9454 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:572:9`!, &memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9455 | |
| 9456 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 2, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos., |
| 9457 | memorycxx . . $ MantaRay#memory.->goal_roomcxx . . $ mantaray_data#goal_room.); |
| 9458 | float cd = .1f; |
| 9459 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &cd); |
| 9460 | |
| 9461 | vectorcxx . . $ vector# my_pos; |
| 9462 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &my_pos); |
| 9463 | |
| 9464 | float dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&my_pos, &memorycxx . . $ MantaRay#memory.->goal_poscxx . . $ mantaray_data#goal_pos.); |
| 9465 | |
| 9466 | if (dist <= MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`!) { |
| 9467 | float catchup_speed; |
| 9468 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9469 | |
| 9470 | float scaled_speed = dist / MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`! * 0.23f * catchup_speed; |
| 9471 | catchup_speed += scaled_speed; |
| 9472 | |
| 9473 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9474 | } else if (dist > MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`!) { |
| 9475 | float catchup_speed; |
| 9476 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MantaRay#memory.->leader_handlecxx . . $ mantaray_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9477 | |
| 9478 | float scaled_speed = 0.23f * catchup_speed; |
| 9479 | catchup_speed += scaled_speed; |
| 9480 | |
| 9481 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9482 | } |
| 9483 | |
| 9484 | // Get the leaders mode |
| 9485 | |
| 9486 | // Set my mode to the leaders mode... (Modes account for flags) |
| 9487 | } |
| 9488 | |
| 9489 | void MantaRaycxx . . $ MantaRay#::DoFramecxx . . $ MantaRay#DoFrame(d4f767463ce0a6b3).(int me) { |
| 9490 | float last_see_target_time; |
| 9491 | float last_hear_target_time; |
| 9492 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_target_time); |
| 9493 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_target_time); |
| 9494 | |
| 9495 | // Periodically update the squad information |
| 9496 | if (memorycxx . . $ MantaRay#memory.->next_update_squad_timecxx . . $ mantaray_data#next_update_squad_time. <= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 9497 | // 3 to 6 seconds |
| 9498 | memorycxx . . $ MantaRay#memory.->next_update_squad_timecxx . . $ mantaray_data#next_update_squad_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f + 3.0f; |
| 9499 | UpdateSquadcxx . . $ MantaRay#UpdateSquad(d4f767463ce0a6b3).(me); |
| 9500 | } |
| 9501 | |
| 9502 | // If your a squadie, check for a leader |
| 9503 | if (memorycxx . . $ MantaRay#memory.->flagscxx . . $ mantaray_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) { |
| 9504 | DoSquadieFramecxx . . $ MantaRay#DoSquadieFrame(d4f767463ce0a6b3).(me); |
| 9505 | } |
| 9506 | |
| 9507 | // if(memory->flags & MRF_LEADER) |
| 9508 | // { |
| 9509 | // vector pos; |
| 9510 | // Obj_Value(me, VF_GET, OBJV_V_POS, &pos); |
| 9511 | // vector gpos; |
| 9512 | // int groom; |
| 9513 | |
| 9514 | // float cd; |
| 9515 | // AI_GoalValue(me, 1, VF_GET, AIGV_I_ROOMNUM, &groom); |
| 9516 | // AI_GoalValue(me, 1, VF_GET, AIGV_V_POS, &gpos); |
| 9517 | // AI_GoalValue(me, 1, VF_GET, AIGV_F_CIRCLE_DIST, &cd); |
| 9518 | // mprintf(0, "%f,%f,%f-%f,%f,%f-%f\n", XYZ(&gpos), XYZ(&pos), cd); |
| 9519 | // } |
| 9520 | |
| 9521 | switch (memorycxx . . $ MantaRay#memory.->modecxx . . $ mantaray_data#mode.) { |
| 9522 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: { |
| 9523 | // mprintf(0, "MODE ATTACK\n"); |
| 9524 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 9525 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9526 | // |
| 9527 | // float dist; |
| 9528 | // AI_GoalValue(me, 1, VF_GET, AIGV_F_DIST_TO_GOAL, &dist); |
| 9529 | } break; |
| 9530 | |
| 9531 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: { |
| 9532 | // mprintf(0, "MODE CBACK\n"); |
| 9533 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 9534 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9535 | |
| 9536 | if (memorycxx . . $ MantaRay#memory.->mode_timecxx . . $ mantaray_data#mode_time. > 5.5f) |
| 9537 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9538 | } break; |
| 9539 | |
| 9540 | case MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!: { |
| 9541 | // mprintf(0, "MODE NORMAL\n"); |
| 9542 | if (Game_GetTimecxx . . $ Game_GetTime.() < last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() < last_hear_target_time + 7.0f) |
| 9543 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9544 | } break; |
| 9545 | } |
| 9546 | |
| 9547 | memorycxx . . $ MantaRay#memory.->mode_timecxx . . $ mantaray_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 9548 | } |
| 9549 | |
| 9550 | bool MantaRaycxx . . $ MantaRay#::DoNotifycxx . . $ MantaRay#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 9551 | if (IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.)) { |
| 9552 | switch (memorycxx . . $ MantaRay#memory.->modecxx . . $ mantaray_data#mode.) { |
| 9553 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: |
| 9554 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 9555 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!); |
| 9556 | return false; |
| 9557 | } |
| 9558 | break; |
| 9559 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: |
| 9560 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 9561 | SetModecxx . . $ MantaRay#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9562 | return false; |
| 9563 | } |
| 9564 | break; |
| 9565 | } |
| 9566 | } else if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!) { |
| 9567 | gb_comcxx . . $ gb_com# *com = (gb_comcxx . . $ gb_com# *)data->extra_infocxx . . $ tOSIRISEventInfo#extra_info.; |
| 9568 | |
| 9569 | return ReceiveCommandcxx . . $ MantaRay#ReceiveCommand(1fae7c3a3935cb04).(me, data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., com->actioncxx . . $ gb_com#action., com->ptrcxx . . $ gb_com#ptr.); |
| 9570 | } |
| 9571 | |
| 9572 | return true; |
| 9573 | } |
| 9574 | |
| 9575 | int16_t MantaRaycxx . . $ MantaRay#::CallEventcxx . . $ MantaRay#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 9576 | switch (event) { |
| 9577 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 9578 | DoInitcxx . . $ MantaRay#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9579 | break; |
| 9580 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 9581 | DoFramecxx . . $ MantaRay#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9582 | break; |
| 9583 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 9584 | return (DoNotifycxx . . $ MantaRay#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 9585 | break; |
| 9586 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 9587 | memorycxx . . $ MantaRay#memory. = (mantaray_datacxx . . $ mantaray_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 9588 | } break; |
| 9589 | } |
| 9590 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 9591 | } |
| 9592 | |
| 9593 | //------------------ |
| 9594 | // Skiff class |
| 9595 | //------------------ |
| 9596 | |
| 9597 | bool Skiffcxx . . $ Skiff#::SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr) { |
| 9598 | gb_comcxx . . $ gb_com# com; |
| 9599 | |
| 9600 | com.actioncxx . . $ gb_com#action. = command; |
| 9601 | com.ptrcxx . . $ gb_com#ptr. = ptr; |
| 9602 | |
| 9603 | tOSIRISEventInfocxx . . $ tOSIRISEventInfo# ei; |
| 9604 | |
| 9605 | ei.me_handlecxx . . $ tOSIRISEventInfo#me_handle. = it; |
| 9606 | ei.extra_infocxx . . $ tOSIRISEventInfo#extra_info. = (void *)&command; |
| 9607 | ei.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. = AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!; |
| 9608 | ei.evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle. = me; |
| 9609 | |
| 9610 | return Obj_CallEventcxx . . $ Obj_CallEvent.(it, EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!, &ei); |
| 9611 | } |
| 9612 | |
| 9613 | bool Skiffcxx . . $ Skiff#::ReceiveCommandcxx . . $ Skiff#ReceiveCommand(1fae7c3a3935cb04).(int me, int it, char command, void *ptr) { |
| 9614 | switch (command) { |
| 9615 | case MRC_JOIN_MEcxx . . $ `scripts/AIGame.cpp:759:9`!: { |
| 9616 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. == 0) { |
| 9617 | memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle. = it; |
| 9618 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. |= MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!; |
| 9619 | |
| 9620 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, memorycxx . . $ Skiff#memory.->modecxx . . $ skiff_data#mode.); |
| 9621 | |
| 9622 | return true; |
| 9623 | } |
| 9624 | } break; |
| 9625 | case MRC_LEAVE_YOUcxx . . $ `scripts/AIGame.cpp:760:9`!: |
| 9626 | break; |
| 9627 | case MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!: { |
| 9628 | int i; |
| 9629 | for (i = 0; i < memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates.; i++) { |
| 9630 | if (memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[i] == it) { |
| 9631 | vectorcxx . . $ vector# goal_pos; |
| 9632 | matrixcxx . . $ matrix# orient; |
| 9633 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &goal_pos); |
| 9634 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 9635 | |
| 9636 | switch (i) { |
| 9637 | case 0: |
| 9638 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`!; |
| 9639 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`!; |
| 9640 | break; |
| 9641 | case 1: |
| 9642 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`!; |
| 9643 | goal_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`!; |
| 9644 | break; |
| 9645 | case 2: |
| 9646 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9647 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9648 | break; |
| 9649 | case 3: |
| 9650 | goal_pos -=cxx . . $ `operator-=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). MRO_FVECcxx . . $ `scripts/AIGame.cpp:768:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9651 | goal_pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.rveccxx . . $ matrix#rvec. *cxx . . $ `operator*`(252247219a31502c). MRO_RVECcxx . . $ `scripts/AIGame.cpp:769:9`! *cxx . . $ `operator*`(252247219a31502c). 2.0f; |
| 9652 | break; |
| 9653 | } |
| 9654 | |
| 9655 | *(vectorcxx . . $ vector# *)ptr =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). goal_pos; |
| 9656 | return true; |
| 9657 | } |
| 9658 | } |
| 9659 | } break; |
| 9660 | case MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!: { |
| 9661 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, (int *)ptr); |
| 9662 | return true; |
| 9663 | } break; |
| 9664 | case MRC_GET_GOAL_ORIENTcxx . . $ `scripts/AIGame.cpp:763:9`!: { |
| 9665 | return true; |
| 9666 | } break; |
| 9667 | } |
| 9668 | |
| 9669 | // mprintf(0, "Skiff action %d failed\n"); |
| 9670 | return false; |
| 9671 | } |
| 9672 | |
| 9673 | void Skiffcxx . . $ Skiff#::UpdateSquadListcxx . . $ Skiff#UpdateSquadList(d4f767463ce0a6b3).(int me) { |
| 9674 | int i; |
| 9675 | |
| 9676 | for (i = 0; i < memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates.; i++) { |
| 9677 | int type; |
| 9678 | int j; |
| 9679 | |
| 9680 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9681 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 9682 | for (j = i; j < memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates. - 1; j++) { |
| 9683 | memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[j] = memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[j + 1]; |
| 9684 | } |
| 9685 | |
| 9686 | memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates.--; |
| 9687 | i--; |
| 9688 | } |
| 9689 | } |
| 9690 | } |
| 9691 | |
| 9692 | void Skiffcxx . . $ Skiff#::UpdateSquadcxx . . $ Skiff#UpdateSquad(d4f767463ce0a6b3).(int me) { |
| 9693 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) |
| 9694 | return; |
| 9695 | |
| 9696 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!) { |
| 9697 | UpdateSquadListcxx . . $ Skiff#UpdateSquadList(d4f767463ce0a6b3).(me); |
| 9698 | |
| 9699 | if (memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates. == 0) |
| 9700 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. &= ~MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!; |
| 9701 | |
| 9702 | if (memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates. >= MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!) |
| 9703 | return; |
| 9704 | } |
| 9705 | |
| 9706 | int scan_objs[25]; |
| 9707 | int n_scan; |
| 9708 | int room; |
| 9709 | vectorcxx . . $ vector# pos; |
| 9710 | int i; |
| 9711 | |
| 9712 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 9713 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 9714 | |
| 9715 | n_scan = AI_GetNearbyObjscxx . . $ AI_GetNearbyObjs(9d0c65cbff229ccc).(&pos, room, 200.0f, scan_objs, 25, false, true, false, true); |
| 9716 | |
| 9717 | for (i = 0; i < n_scan; i++) { |
| 9718 | uint16_tcxx . . $ uint16_t# id; |
| 9719 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 9720 | |
| 9721 | // this is more rare than the types matching; so, do it first |
| 9722 | if (id == memorycxx . . $ Skiff#memory.->skiff_idcxx . . $ skiff_data#skiff_id.) { |
| 9723 | int type; |
| 9724 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(scan_objs[i], VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9725 | if (type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`! && scan_objs[i] != me) { |
| 9726 | bool f_on_team = false; |
| 9727 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!) { |
| 9728 | int j; |
| 9729 | for (j = 0; j < memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates.; j++) { |
| 9730 | if (scan_objs[i] == memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[j]) { |
| 9731 | f_on_team = true; |
| 9732 | break; |
| 9733 | } |
| 9734 | } |
| 9735 | } |
| 9736 | |
| 9737 | if (!f_on_team) { |
| 9738 | if (SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(me, scan_objs[i], MRC_JOIN_MEcxx . . $ `scripts/AIGame.cpp:759:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)) { |
| 9739 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. |= MRF_LEADERcxx . . $ `scripts/AIGame.cpp:754:9`!; |
| 9740 | memorycxx . . $ Skiff#memory.->teammatecxx . . $ skiff_data#teammate.[memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates.++] = scan_objs[i]; |
| 9741 | } |
| 9742 | } |
| 9743 | } |
| 9744 | } |
| 9745 | |
| 9746 | if (memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates. >= MR_MAX_TEAMMATEScxx . . $ `scripts/AIGame.cpp:765:9`!) |
| 9747 | return; |
| 9748 | } |
| 9749 | } |
| 9750 | |
| 9751 | void Skiffcxx . . $ Skiff#::DoInitcxx . . $ Skiff#DoInit(d4f767463ce0a6b3).(int me) { |
| 9752 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 9753 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 9754 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(skiff_datacxx . . $ skiff_data#); |
| 9755 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 9756 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 9757 | |
| 9758 | memorycxx . . $ Skiff#memory. = (skiff_datacxx . . $ skiff_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 9759 | |
| 9760 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.); |
| 9761 | memorycxx . . $ Skiff#memory.->attack_speedcxx . . $ skiff_data#attack_speed. = 1.6f * memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.; |
| 9762 | |
| 9763 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. = 0; |
| 9764 | memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9765 | memorycxx . . $ Skiff#memory.->num_teammatescxx . . $ skiff_data#num_teammates. = 0; |
| 9766 | |
| 9767 | // .1 to .6 seconds into the level, do the first matching |
| 9768 | memorycxx . . $ Skiff#memory.->next_update_squad_timecxx . . $ skiff_data#next_update_squad_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * .5f + 0.1f; |
| 9769 | |
| 9770 | memorycxx . . $ Skiff#memory.->skiff_idcxx . . $ skiff_data#skiff_id. = Obj_FindIDcxx . . $ Obj_FindID.("Skiff"); |
| 9771 | |
| 9772 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9773 | } |
| 9774 | |
| 9775 | void Skiffcxx . . $ Skiff#::SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 9776 | int f_attack_flags = (AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!); |
| 9777 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 9778 | |
| 9779 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.); |
| 9780 | |
| 9781 | switch (mode) { |
| 9782 | case MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!: { |
| 9783 | vectorcxx . . $ vector# pos; |
| 9784 | int room = 0; |
| 9785 | float dist = 15.0f; |
| 9786 | |
| 9787 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9788 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`!, &pos, |
| 9789 | room); |
| 9790 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9791 | } break; |
| 9792 | |
| 9793 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: { |
| 9794 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9795 | |
| 9796 | // memory->next_attack_time = Game_GetTime() + 10.0 * ((float)rand()/(float)RAND_MAX); |
| 9797 | |
| 9798 | float dist = 60.0f + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 10.0f; |
| 9799 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, |
| 9800 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | |
| 9801 | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, |
| 9802 | OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9803 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9804 | |
| 9805 | dist = 10.0f; |
| 9806 | int g_index = |
| 9807 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 9808 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9809 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9810 | } break; |
| 9811 | |
| 9812 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: { |
| 9813 | vectorcxx . . $ vector# pos; |
| 9814 | int room = 0; |
| 9815 | |
| 9816 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 9817 | |
| 9818 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 9819 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 9820 | |
| 9821 | float dist = 10.0f; |
| 9822 | |
| 9823 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, |
| 9824 | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, &pos, room); |
| 9825 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9826 | |
| 9827 | int g_index = |
| 9828 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_AROUND_OBJcxx . . $ `Descent3/aistruct_external.h:203:9`!, ACTIVATION_BLEND_LEVELcxx . . $ `Descent3/aistruct_external.h:280:9`!, 1.0f, -1, |
| 9829 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 9830 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, g_index, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 9831 | |
| 9832 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Skiff#memory.->attack_speedcxx . . $ skiff_data#attack_speed.); |
| 9833 | } break; |
| 9834 | } |
| 9835 | |
| 9836 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) { |
| 9837 | // The leader is alive; so, get my new goal pos |
| 9838 | SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!, &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos.); |
| 9839 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_V_POScxx . . $ `scripts/osiris_common.h:578:9`!, &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos.); |
| 9840 | SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!, &memorycxx . . $ Skiff#memory.->goal_roomcxx . . $ skiff_data#goal_room.); |
| 9841 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:572:9`!, &memorycxx . . $ Skiff#memory.->goal_roomcxx . . $ skiff_data#goal_room.); |
| 9842 | |
| 9843 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_POScxx . . $ `Descent3/aistruct_external.h:201:9`!, 2, 4.0f, -1, GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!, |
| 9844 | &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos., memorycxx . . $ Skiff#memory.->goal_roomcxx . . $ skiff_data#goal_room.); |
| 9845 | } |
| 9846 | |
| 9847 | memorycxx . . $ Skiff#memory.->modecxx . . $ skiff_data#mode. = mode; |
| 9848 | memorycxx . . $ Skiff#memory.->mode_timecxx . . $ skiff_data#mode_time. = 0.0f; |
| 9849 | } |
| 9850 | |
| 9851 | void Skiffcxx . . $ Skiff#::DoSquadieFramecxx . . $ Skiff#DoSquadieFrame(d4f767463ce0a6b3).(int me) { |
| 9852 | int type; |
| 9853 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 9854 | |
| 9855 | // Check if the leader is still alive |
| 9856 | if (type == OBJ_NONEcxx . . $ `Descent3/object_external.h:159:9`!) { |
| 9857 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_CATCHUPcxx . . $ `scripts/AIGame.cpp:756:9`!) { |
| 9858 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.); |
| 9859 | } |
| 9860 | |
| 9861 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. = 0; |
| 9862 | memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 9863 | |
| 9864 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9865 | return; |
| 9866 | } |
| 9867 | |
| 9868 | // The leader is alive; so, get my new goal pos |
| 9869 | SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., MRC_GET_GOAL_POScxx . . $ `scripts/AIGame.cpp:761:9`!, &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos.); |
| 9870 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_V_POScxx . . $ `scripts/osiris_common.h:578:9`!, &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos.); |
| 9871 | SendCommandcxx . . $ Skiff#SendCommand(1fae7c3a3935cb04).(me, memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., MRC_GET_GOAL_ROOMcxx . . $ `scripts/AIGame.cpp:762:9`!, &memorycxx . . $ Skiff#memory.->goal_roomcxx . . $ skiff_data#goal_room.); |
| 9872 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 2, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:572:9`!, &memorycxx . . $ Skiff#memory.->goal_roomcxx . . $ skiff_data#goal_room.); |
| 9873 | |
| 9874 | vectorcxx . . $ vector# my_pos; |
| 9875 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &my_pos); |
| 9876 | |
| 9877 | float dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&my_pos, &memorycxx . . $ Skiff#memory.->goal_poscxx . . $ skiff_data#goal_pos.); |
| 9878 | |
| 9879 | if (dist <= MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`!) { |
| 9880 | float scaled_speed = dist / MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`! * 0.18f * memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.; |
| 9881 | float speed; |
| 9882 | |
| 9883 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 9884 | |
| 9885 | speed += scaled_speed; |
| 9886 | |
| 9887 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. &= ~MRF_CATCHUPcxx . . $ `scripts/AIGame.cpp:756:9`!; |
| 9888 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Skiff#memory.->base_speedcxx . . $ skiff_data#base_speed.); |
| 9889 | } else if (!(memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_CATCHUPcxx . . $ `scripts/AIGame.cpp:756:9`!) && dist > MRO_CATCHUP_DISTcxx . . $ `scripts/AIGame.cpp:773:9`!) { |
| 9890 | // Between 18% and 23% speed up to get into formation |
| 9891 | float catchup_speed; |
| 9892 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ Skiff#memory.->leader_handlecxx . . $ skiff_data#leader_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9893 | catchup_speed += (catchup_speed * .18f) + (catchup_speed * .05f * ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!)); |
| 9894 | |
| 9895 | memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. |= MRF_CATCHUPcxx . . $ `scripts/AIGame.cpp:756:9`!; |
| 9896 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &catchup_speed); |
| 9897 | } |
| 9898 | |
| 9899 | // Get the leaders mode |
| 9900 | |
| 9901 | // Set my mode to the leaders mode... (Modes account for flags) |
| 9902 | } |
| 9903 | |
| 9904 | void Skiffcxx . . $ Skiff#::DoFramecxx . . $ Skiff#DoFrame(d4f767463ce0a6b3).(int me) { |
| 9905 | float last_see_target_time; |
| 9906 | float last_hear_target_time; |
| 9907 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_target_time); |
| 9908 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LAST_HEAR_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:558:9`!, &last_hear_target_time); |
| 9909 | |
| 9910 | // Periodically update the squad information |
| 9911 | if (memorycxx . . $ Skiff#memory.->next_update_squad_timecxx . . $ skiff_data#next_update_squad_time. <= Game_GetTimecxx . . $ Game_GetTime.()) { |
| 9912 | // 3 to 6 seconds |
| 9913 | memorycxx . . $ Skiff#memory.->next_update_squad_timecxx . . $ skiff_data#next_update_squad_time. = Game_GetTimecxx . . $ Game_GetTime.() + ((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f + 3.0f; |
| 9914 | // UpdateSquad(me); |
| 9915 | } |
| 9916 | |
| 9917 | // If your a squadie, check for a leader |
| 9918 | if (memorycxx . . $ Skiff#memory.->flagscxx . . $ skiff_data#flags. & MRF_SQUADIEcxx . . $ `scripts/AIGame.cpp:755:9`!) { |
| 9919 | DoSquadieFramecxx . . $ Skiff#DoSquadieFrame(d4f767463ce0a6b3).(me); |
| 9920 | } |
| 9921 | |
| 9922 | switch (memorycxx . . $ Skiff#memory.->modecxx . . $ skiff_data#mode.) { |
| 9923 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: { |
| 9924 | // mprintf(0, "MODE ATTACK\n"); |
| 9925 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 9926 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9927 | // |
| 9928 | // float dist; |
| 9929 | // AI_GoalValue(me, 1, VF_GET, AIGV_F_DIST_TO_GOAL, &dist); |
| 9930 | } break; |
| 9931 | |
| 9932 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: { |
| 9933 | // mprintf(0, "MODE CBACK\n"); |
| 9934 | if (Game_GetTimecxx . . $ Game_GetTime.() > last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() > last_hear_target_time + 7.0f) |
| 9935 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!); |
| 9936 | |
| 9937 | if (memorycxx . . $ Skiff#memory.->mode_timecxx . . $ skiff_data#mode_time. > 4.0f) |
| 9938 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9939 | } break; |
| 9940 | |
| 9941 | case MRM_NORMALcxx . . $ `scripts/AIGame.cpp:749:9`!: { |
| 9942 | // mprintf(0, "MODE NORMAL\n"); |
| 9943 | if (Game_GetTimecxx . . $ Game_GetTime.() < last_see_target_time + 7.0f && Game_GetTimecxx . . $ Game_GetTime.() < last_see_target_time + 7.0f) |
| 9944 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9945 | } break; |
| 9946 | } |
| 9947 | |
| 9948 | memorycxx . . $ Skiff#memory.->mode_timecxx . . $ skiff_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 9949 | } |
| 9950 | |
| 9951 | bool Skiffcxx . . $ Skiff#::DoNotifycxx . . $ Skiff#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 9952 | if (IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.)) { |
| 9953 | switch (memorycxx . . $ Skiff#memory.->modecxx . . $ skiff_data#mode.) { |
| 9954 | case MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!: |
| 9955 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 9956 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!); |
| 9957 | return false; |
| 9958 | } |
| 9959 | break; |
| 9960 | case MRM_ATTACK_CIRCLE_BACKcxx . . $ `scripts/AIGame.cpp:751:9`!: |
| 9961 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..goal_numcxx . . $ tOSIRISEVTAINOTIFY#goal_num. == 1) { |
| 9962 | SetModecxx . . $ Skiff#SetMode(5016a63d0a5aceb0).(me, MRM_ATTACKcxx . . $ `scripts/AIGame.cpp:750:9`!); |
| 9963 | return false; |
| 9964 | } |
| 9965 | break; |
| 9966 | } |
| 9967 | } else if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_USER_DEFINEDcxx . . $ `Descent3/aistruct_external.h:301:9`!) { |
| 9968 | gb_comcxx . . $ gb_com# *com = (gb_comcxx . . $ gb_com# *)data->extra_infocxx . . $ tOSIRISEventInfo#extra_info.; |
| 9969 | |
| 9970 | return ReceiveCommandcxx . . $ Skiff#ReceiveCommand(1fae7c3a3935cb04).(me, data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., com->actioncxx . . $ gb_com#action., com->ptrcxx . . $ gb_com#ptr.); |
| 9971 | } |
| 9972 | |
| 9973 | return true; |
| 9974 | } |
| 9975 | |
| 9976 | int16_t Skiffcxx . . $ Skiff#::CallEventcxx . . $ Skiff#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 9977 | switch (event) { |
| 9978 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 9979 | DoInitcxx . . $ Skiff#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9980 | break; |
| 9981 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 9982 | DoFramecxx . . $ Skiff#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 9983 | break; |
| 9984 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 9985 | return (DoNotifycxx . . $ Skiff#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 9986 | break; |
| 9987 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 9988 | memorycxx . . $ Skiff#memory. = (skiff_datacxx . . $ skiff_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 9989 | } break; |
| 9990 | } |
| 9991 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 9992 | } |
| 9993 | |
| 9994 | //------------------ |
| 9995 | // SpyHunter class |
| 9996 | //------------------ |
| 9997 | |
| 9998 | void SpyHuntercxx . . $ SpyHunter#::DoInitcxx . . $ SpyHunter#DoInit(d4f767463ce0a6b3).(int me) { |
| 9999 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10000 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10001 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(spyhunter_datacxx . . $ spyhunter_data#); |
| 10002 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10003 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10004 | |
| 10005 | memorycxx . . $ SpyHunter#memory. = (spyhunter_datacxx . . $ spyhunter_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10006 | memorycxx . . $ SpyHunter#memory.->last_attack_modecxx . . $ spyhunter_data#last_attack_mode. = SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`!; |
| 10007 | memorycxx . . $ SpyHunter#memory.->f_hit_by_emdcxx . . $ spyhunter_data#f_hit_by_emd. = false; |
| 10008 | memorycxx . . $ SpyHunter#memory.->emd_idcxx . . $ spyhunter_data#emd_id. = Wpn_FindIDcxx . . $ Wpn_FindID.("EMDblob"); |
| 10009 | memorycxx . . $ SpyHunter#memory.->tick_soundcxx . . $ spyhunter_data#tick_sound. = Sound_FindIdcxx . . $ Sound_FindId.("WpnBmbTickElectricalA"); |
| 10010 | memorycxx . . $ SpyHunter#memory.->last_tick_timecxx . . $ spyhunter_data#last_tick_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 10011 | |
| 10012 | SetModecxx . . $ SpyHunter#SetMode(5016a63d0a5aceb0).(me, SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`!); |
| 10013 | } |
| 10014 | |
| 10015 | void SpyHuntercxx . . $ SpyHunter#::SetModecxx . . $ SpyHunter#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 10016 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 10017 | |
| 10018 | int f_attack_flags = (AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`! | AIF_AUTO_AVOID_FRIENDScxx . . $ `Descent3/aistruct_external.h:376:9`!); |
| 10019 | |
| 10020 | if (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`! || memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`!) { |
| 10021 | memorycxx . . $ SpyHunter#memory.->last_attack_modecxx . . $ spyhunter_data#last_attack_mode. = memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode.; |
| 10022 | } |
| 10023 | |
| 10024 | switch (mode) { |
| 10025 | case SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`!: { |
| 10026 | vectorcxx . . $ vector# pos; |
| 10027 | int room = 0; |
| 10028 | float dist = 5.0f; |
| 10029 | |
| 10030 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 10031 | |
| 10032 | // If last see target time > 7.0 orient velocity |
| 10033 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 1, 1.0f, -1, |
| 10034 | GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:224:9`! | GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!, &pos, room); |
| 10035 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 10036 | } break; |
| 10037 | case SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`!: { |
| 10038 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 10039 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 10040 | } break; |
| 10041 | case SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`!: { |
| 10042 | float dist = -1000.0f; |
| 10043 | |
| 10044 | f_attack_flags |= AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`!; // Bombs don't dodge |
| 10045 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &f_attack_flags); |
| 10046 | |
| 10047 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, |
| 10048 | GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:224:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 10049 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 1, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIGV_F_CIRCLE_DISTcxx . . $ `scripts/osiris_common.h:592:9`!, &dist); |
| 10050 | } break; |
| 10051 | } |
| 10052 | |
| 10053 | memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. = mode; |
| 10054 | memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time. = 0.0f; |
| 10055 | memorycxx . . $ SpyHunter#memory.->last_tick_timecxx . . $ spyhunter_data#last_tick_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 10056 | memorycxx . . $ SpyHunter#memory.->next_summon_timecxx . . $ spyhunter_data#next_summon_time. = Game_GetTimecxx . . $ Game_GetTime.() + 5.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 10057 | } |
| 10058 | |
| 10059 | bool SpyHuntercxx . . $ SpyHunter#::DoNotifycxx . . $ SpyHunter#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10060 | tOSIRISEVTAINOTIFYcxx . . $ tOSIRISEVTAINOTIFY# *notify = &data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify.; |
| 10061 | |
| 10062 | if ((!memorycxx . . $ SpyHunter#memory.->f_hit_by_emdcxx . . $ spyhunter_data#f_hit_by_emd.) && notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_HIT_BY_WEAPONcxx . . $ `Descent3/aistruct_external.h:299:9`!) { |
| 10063 | int type; |
| 10064 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(notify->it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 10065 | |
| 10066 | if (type == OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!) { |
| 10067 | uint16_tcxx . . $ uint16_t# id; |
| 10068 | |
| 10069 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(notify->it_handlecxx . . $ tOSIRISEVTAINOTIFY#it_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 10070 | if (id == memorycxx . . $ SpyHunter#memory.->emd_idcxx . . $ spyhunter_data#emd_id.) { |
| 10071 | memorycxx . . $ SpyHunter#memory.->f_hit_by_emdcxx . . $ spyhunter_data#f_hit_by_emd. = true; |
| 10072 | } |
| 10073 | } |
| 10074 | } |
| 10075 | |
| 10076 | if (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`! || (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`! && memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time. > 10.0f)) { |
| 10077 | if ((notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_OBJ_FIREDcxx . . $ `Descent3/aistruct_external.h:293:9`!) || (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_HIT_BY_WEAPONcxx . . $ `Descent3/aistruct_external.h:299:9`!) || |
| 10078 | (notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_BUMPED_OBJcxx . . $ `Descent3/aistruct_external.h:307:9`!)) { |
| 10079 | if (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`!) { |
| 10080 | SetModecxx . . $ SpyHunter#SetMode(5016a63d0a5aceb0).(me, SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`!); |
| 10081 | return true; |
| 10082 | } else { |
| 10083 | SetModecxx . . $ SpyHunter#SetMode(5016a63d0a5aceb0).(me, SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`!); |
| 10084 | return true; |
| 10085 | } |
| 10086 | } |
| 10087 | } |
| 10088 | |
| 10089 | if (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode. == SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`! && notify->notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_BUMPED_OBJcxx . . $ `Descent3/aistruct_external.h:307:9`!) { |
| 10090 | int room; |
| 10091 | vectorcxx . . $ vector# pos; |
| 10092 | |
| 10093 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 10094 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(me, 0, &pos); |
| 10095 | |
| 10096 | if (!memorycxx . . $ SpyHunter#memory.->f_hit_by_emdcxx . . $ spyhunter_data#f_hit_by_emd.) { |
| 10097 | vectorcxx . . $ vector# velocity; |
| 10098 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 10099 | |
| 10100 | int weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("FragBarrel"); |
| 10101 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me, &velocity); |
| 10102 | } |
| 10103 | |
| 10104 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 10105 | |
| 10106 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 10107 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 10108 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 10109 | mstruct.amountcxx . . $ msafe_struct#amount. = 1000.0f; |
| 10110 | |
| 10111 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 10112 | } |
| 10113 | |
| 10114 | return true; |
| 10115 | } |
| 10116 | |
| 10117 | void SpyHuntercxx . . $ SpyHunter#::DoFramecxx . . $ SpyHunter#DoFrame(d4f767463ce0a6b3).(int me) { |
| 10118 | // mprintf(0, "Current goal is %d and the ", AI_GetCurGoalIndex(me)); |
| 10119 | |
| 10120 | switch (memorycxx . . $ SpyHunter#memory.->modecxx . . $ spyhunter_data#mode.) { |
| 10121 | case SHM_NORMALcxx . . $ `scripts/AIGame.cpp:869:9`!: { |
| 10122 | // int gt = -1; |
| 10123 | // |
| 10124 | // if(AI_GetCurGoalIndex(me) >= 0) |
| 10125 | // AI_GoalValue(me, AI_GetCurGoalIndex(me), VF_GET, AIGV_I_TYPE, >); |
| 10126 | // |
| 10127 | // mprintf(0, "current Mode is Normal and GT %X\n", gt); |
| 10128 | } break; |
| 10129 | case SHM_ATTACKcxx . . $ `scripts/AIGame.cpp:870:9`!: { |
| 10130 | // mprintf(0, "current Mode is Attack\n"); |
| 10131 | // if(memory->mode_time > 10.0f) |
| 10132 | // { |
| 10133 | // SetMode(me, SHM_BOMB_ATTACK); |
| 10134 | // } |
| 10135 | } break; |
| 10136 | case SHM_BOMB_ATTACKcxx . . $ `scripts/AIGame.cpp:871:9`!: { |
| 10137 | float tick_interval; |
| 10138 | // mprintf(0, "current Mode is Bomb Attack\n"); |
| 10139 | |
| 10140 | if (memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time. < SH_BOMB_TICK_RAMP_TIMEcxx . . $ `scripts/AIGame.cpp:877:9`!) { |
| 10141 | float p_explode = (SH_BOMB_TICK_RAMP_TIMEcxx . . $ `scripts/AIGame.cpp:877:9`! - memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time.) / SH_BOMB_TICK_RAMP_TIMEcxx . . $ `scripts/AIGame.cpp:877:9`!; |
| 10142 | |
| 10143 | tick_interval = (SH_MAX_TICK_INTERVALcxx . . $ `scripts/AIGame.cpp:878:9`! * p_explode) + (SH_MIN_TICK_INTERVALcxx . . $ `scripts/AIGame.cpp:879:9`! * (1.0f - p_explode)); |
| 10144 | } else { |
| 10145 | tick_interval = SH_MIN_TICK_INTERVALcxx . . $ `scripts/AIGame.cpp:879:9`!; |
| 10146 | } |
| 10147 | |
| 10148 | if (memorycxx . . $ SpyHunter#memory.->last_tick_timecxx . . $ spyhunter_data#last_tick_time. + tick_interval < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 10149 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, memorycxx . . $ SpyHunter#memory.->tick_soundcxx . . $ spyhunter_data#tick_sound.); |
| 10150 | memorycxx . . $ SpyHunter#memory.->last_tick_timecxx . . $ spyhunter_data#last_tick_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 10151 | } |
| 10152 | |
| 10153 | if (memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time. < SH_MAX_BOMB_TIMEcxx . . $ `scripts/AIGame.cpp:873:9`!) { |
| 10154 | float max_speed; |
| 10155 | |
| 10156 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &max_speed); |
| 10157 | max_speed += SH_BOMB_ACCELERATIONcxx . . $ `scripts/AIGame.cpp:874:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10158 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &max_speed); |
| 10159 | |
| 10160 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_TURN_RATEcxx . . $ `scripts/osiris_common.h:507:9`!, &max_speed); |
| 10161 | max_speed += SH_BOMB_ROT_ACCcxx . . $ `scripts/AIGame.cpp:875:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10162 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_TURN_RATEcxx . . $ `scripts/osiris_common.h:507:9`!, &max_speed); |
| 10163 | |
| 10164 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &max_speed); |
| 10165 | max_speed += SH_BOMB_ACCELERATIONcxx . . $ `scripts/AIGame.cpp:874:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10166 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &max_speed); |
| 10167 | } |
| 10168 | } break; |
| 10169 | } |
| 10170 | |
| 10171 | memorycxx . . $ SpyHunter#memory.->mode_timecxx . . $ spyhunter_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10172 | } |
| 10173 | |
| 10174 | int16_t SpyHuntercxx . . $ SpyHunter#::CallEventcxx . . $ SpyHunter#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10175 | switch (event) { |
| 10176 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10177 | DoInitcxx . . $ SpyHunter#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10178 | break; |
| 10179 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 10180 | DoFramecxx . . $ SpyHunter#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10181 | break; |
| 10182 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 10183 | return (DoNotifycxx . . $ SpyHunter#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 10184 | break; |
| 10185 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10186 | memorycxx . . $ SpyHunter#memory. = (spyhunter_datacxx . . $ spyhunter_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10187 | } break; |
| 10188 | } |
| 10189 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10190 | } |
| 10191 | |
| 10192 | //------------------ |
| 10193 | // Sniper class |
| 10194 | //------------------ |
| 10195 | |
| 10196 | bool Snipercxx . . $ Sniper#::DoNotifycxx . . $ Sniper#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { return true; } |
| 10197 | |
| 10198 | void Snipercxx . . $ Sniper#::SetModecxx . . $ Sniper#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 10199 | switch (mode) { |
| 10200 | case SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:941:9`!: { |
| 10201 | vectorcxx . . $ vector# pos; |
| 10202 | int room = 0; |
| 10203 | |
| 10204 | int flags = GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!; |
| 10205 | |
| 10206 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10207 | flags |= GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!; |
| 10208 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, |
| 10209 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!); |
| 10210 | memorycxx . . $ Sniper#memory.->time_till_next_modecxx . . $ sniper_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10211 | } else { |
| 10212 | float timescaler = 1.0f; |
| 10213 | |
| 10214 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) >= 94) { |
| 10215 | flags |= GF_ORIENT_VELOCITYcxx . . $ `Descent3/aistruct_external.h:228:9`! | GF_SPEED_FLEEcxx . . $ `Descent3/aistruct_external.h:251:9`!; |
| 10216 | timescaler = 2.0f; |
| 10217 | } else { |
| 10218 | flags |= GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`!; |
| 10219 | } |
| 10220 | |
| 10221 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 3, 1.0f, -1, flags, &pos, room); |
| 10222 | |
| 10223 | float speed = memorycxx . . $ Sniper#memory.->base_speedcxx . . $ sniper_data#base_speed. + memorycxx . . $ Sniper#memory.->base_speedcxx . . $ sniper_data#base_speed. * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * .5; |
| 10224 | float delta_vel = memorycxx . . $ Sniper#memory.->base_acccxx . . $ sniper_data#base_acc. + memorycxx . . $ Sniper#memory.->base_acccxx . . $ sniper_data#base_acc. * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * .5; |
| 10225 | |
| 10226 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 10227 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &delta_vel); |
| 10228 | |
| 10229 | memorycxx . . $ Sniper#memory.->time_till_next_modecxx . . $ sniper_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10230 | memorycxx . . $ Sniper#memory.->time_till_next_modecxx . . $ sniper_data#time_till_next_mode. *= timescaler; |
| 10231 | } |
| 10232 | |
| 10233 | } break; |
| 10234 | case SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!: { |
| 10235 | bool used; |
| 10236 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10237 | |
| 10238 | if (used) { |
| 10239 | int flags; |
| 10240 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!, &flags); |
| 10241 | |
| 10242 | if (!(flags & GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!)) { |
| 10243 | AI_ClearGoalcxx . . $ AI_ClearGoal.(me, 3); |
| 10244 | } |
| 10245 | } |
| 10246 | |
| 10247 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Sniper#memory.->base_speedcxx . . $ sniper_data#base_speed.); |
| 10248 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Sniper#memory.->base_acccxx . . $ sniper_data#base_acc.); |
| 10249 | memorycxx . . $ Sniper#memory.->time_till_next_modecxx . . $ sniper_data#time_till_next_mode. = 5.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 10250 | +6.0f; |
| 10251 | } break; |
| 10252 | } |
| 10253 | |
| 10254 | memorycxx . . $ Sniper#memory.->mode_timecxx . . $ sniper_data#mode_time. = 0.0f; |
| 10255 | memorycxx . . $ Sniper#memory.->modecxx . . $ sniper_data#mode. = mode; |
| 10256 | } |
| 10257 | |
| 10258 | void Snipercxx . . $ Sniper#::DoInitcxx . . $ Sniper#DoInit(d4f767463ce0a6b3).(int me) { |
| 10259 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10260 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10261 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(sniper_datacxx . . $ sniper_data#); |
| 10262 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10263 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10264 | |
| 10265 | memorycxx . . $ Sniper#memory. = (sniper_datacxx . . $ sniper_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10266 | |
| 10267 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ Sniper#memory.->base_speedcxx . . $ sniper_data#base_speed.); |
| 10268 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ Sniper#memory.->base_acccxx . . $ sniper_data#base_acc.); |
| 10269 | |
| 10270 | SetModecxx . . $ Sniper#SetMode(5016a63d0a5aceb0).(me, SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!); |
| 10271 | } |
| 10272 | |
| 10273 | void Snipercxx . . $ Sniper#::DoFramecxx . . $ Sniper#DoFrame(d4f767463ce0a6b3).(int me) { |
| 10274 | msafe_structcxx . . $ msafe_struct# m; |
| 10275 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 10276 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!, &m); |
| 10277 | int orbot_id = Obj_FindIDcxx . . $ Obj_FindID.("d3bot20"); |
| 10278 | |
| 10279 | if (m.idcxx . . $ msafe_struct#id. != orbot_id) { |
| 10280 | bool used; |
| 10281 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10282 | |
| 10283 | if (used) { |
| 10284 | return; |
| 10285 | } |
| 10286 | |
| 10287 | /* float awareness; |
| 10288 | AI_Value(me, VF_GET, AIV_F_AWARENESS, &awareness); |
| 10289 | |
| 10290 | if(awareness <= AWARE_BARELY) |
| 10291 | { |
| 10292 | if(memory->mode != SNIPER_BASE) |
| 10293 | { |
| 10294 | SetMode(me, SNIPER_BASE); |
| 10295 | } |
| 10296 | |
| 10297 | return; |
| 10298 | }*/ |
| 10299 | } |
| 10300 | |
| 10301 | if (memorycxx . . $ Sniper#memory.->time_till_next_modecxx . . $ sniper_data#time_till_next_mode. < memorycxx . . $ Sniper#memory.->mode_timecxx . . $ sniper_data#mode_time.) { |
| 10302 | if (memorycxx . . $ Sniper#memory.->modecxx . . $ sniper_data#mode. == SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!) |
| 10303 | SetModecxx . . $ Sniper#SetMode(5016a63d0a5aceb0).(me, SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:941:9`!); |
| 10304 | else |
| 10305 | SetModecxx . . $ Sniper#SetMode(5016a63d0a5aceb0).(me, SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!); |
| 10306 | } |
| 10307 | |
| 10308 | memorycxx . . $ Sniper#memory.->mode_timecxx . . $ sniper_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10309 | } |
| 10310 | |
| 10311 | int16_t Snipercxx . . $ Sniper#::CallEventcxx . . $ Sniper#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10312 | switch (event) { |
| 10313 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10314 | DoInitcxx . . $ Sniper#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10315 | break; |
| 10316 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 10317 | DoFramecxx . . $ Sniper#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10318 | break; |
| 10319 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 10320 | return (DoNotifycxx . . $ Sniper#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 10321 | break; |
| 10322 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10323 | memorycxx . . $ Sniper#memory. = (sniper_datacxx . . $ sniper_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10324 | } break; |
| 10325 | } |
| 10326 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10327 | } |
| 10328 | |
| 10329 | //------------------ |
| 10330 | // SniperNoRun class |
| 10331 | //------------------ |
| 10332 | |
| 10333 | bool SniperNoRuncxx . . $ SniperNoRun#::DoNotifycxx . . $ SniperNoRun#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { return true; } |
| 10334 | |
| 10335 | void SniperNoRuncxx . . $ SniperNoRun#::SetModecxx . . $ SniperNoRun#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 10336 | switch (mode) { |
| 10337 | case SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:941:9`!: { |
| 10338 | vectorcxx . . $ vector# pos; |
| 10339 | int room = 0; |
| 10340 | |
| 10341 | int flags = GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`!; |
| 10342 | |
| 10343 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10344 | flags |= GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!; |
| 10345 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, |
| 10346 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!); |
| 10347 | memorycxx . . $ SniperNoRun#memory.->time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10348 | } else { |
| 10349 | float timescaler = 1.0f; |
| 10350 | |
| 10351 | flags |= GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`!; |
| 10352 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_WANDER_AROUNDcxx . . $ `Descent3/aistruct_external.h:187:9`!, 3, 1.0f, -1, flags, &pos, room); |
| 10353 | |
| 10354 | float speed = memorycxx . . $ SniperNoRun#memory.->base_speedcxx . . $ snipernorun_data#base_speed. + memorycxx . . $ SniperNoRun#memory.->base_speedcxx . . $ snipernorun_data#base_speed. * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * .5; |
| 10355 | float delta_vel = memorycxx . . $ SniperNoRun#memory.->base_acccxx . . $ snipernorun_data#base_acc. + memorycxx . . $ SniperNoRun#memory.->base_acccxx . . $ snipernorun_data#base_acc. * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! * .5; |
| 10356 | |
| 10357 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &speed); |
| 10358 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &delta_vel); |
| 10359 | |
| 10360 | memorycxx . . $ SniperNoRun#memory.->time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode. = 2.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10361 | memorycxx . . $ SniperNoRun#memory.->time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode. *= timescaler; |
| 10362 | } |
| 10363 | |
| 10364 | } break; |
| 10365 | case SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!: { |
| 10366 | bool used; |
| 10367 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10368 | |
| 10369 | if (used) { |
| 10370 | int flags; |
| 10371 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!, &flags); |
| 10372 | |
| 10373 | if (!(flags & GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!)) { |
| 10374 | AI_ClearGoalcxx . . $ AI_ClearGoal.(me, 3); |
| 10375 | } |
| 10376 | } |
| 10377 | |
| 10378 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ SniperNoRun#memory.->base_speedcxx . . $ snipernorun_data#base_speed.); |
| 10379 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ SniperNoRun#memory.->base_acccxx . . $ snipernorun_data#base_acc.); |
| 10380 | memorycxx . . $ SniperNoRun#memory.->time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode. = 5.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 10381 | +4.0f; |
| 10382 | } break; |
| 10383 | } |
| 10384 | |
| 10385 | memorycxx . . $ SniperNoRun#memory.->mode_timecxx . . $ snipernorun_data#mode_time. = 0.0f; |
| 10386 | memorycxx . . $ SniperNoRun#memory.->modecxx . . $ snipernorun_data#mode. = mode; |
| 10387 | } |
| 10388 | |
| 10389 | void SniperNoRuncxx . . $ SniperNoRun#::DoInitcxx . . $ SniperNoRun#DoInit(d4f767463ce0a6b3).(int me) { |
| 10390 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10391 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10392 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(snipernorun_datacxx . . $ snipernorun_data#); |
| 10393 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10394 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10395 | |
| 10396 | memorycxx . . $ SniperNoRun#memory. = (snipernorun_datacxx . . $ snipernorun_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10397 | |
| 10398 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ SniperNoRun#memory.->base_speedcxx . . $ snipernorun_data#base_speed.); |
| 10399 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ SniperNoRun#memory.->base_acccxx . . $ snipernorun_data#base_acc.); |
| 10400 | |
| 10401 | SetModecxx . . $ SniperNoRun#SetMode(5016a63d0a5aceb0).(me, SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!); |
| 10402 | } |
| 10403 | |
| 10404 | void SniperNoRuncxx . . $ SniperNoRun#::DoFramecxx . . $ SniperNoRun#DoFrame(d4f767463ce0a6b3).(int me) { |
| 10405 | msafe_structcxx . . $ msafe_struct# m; |
| 10406 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 10407 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_IDcxx . . $ `scripts/osiris_common.h:813:9`!, &m); |
| 10408 | int orbot_id = Obj_FindIDcxx . . $ Obj_FindID.("d3bot20"); |
| 10409 | |
| 10410 | if (m.idcxx . . $ msafe_struct#id. != orbot_id) { |
| 10411 | bool used; |
| 10412 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10413 | |
| 10414 | if (used) { |
| 10415 | return; |
| 10416 | } |
| 10417 | |
| 10418 | /* float awareness; |
| 10419 | AI_Value(me, VF_GET, AIV_F_AWARENESS, &awareness); |
| 10420 | |
| 10421 | if(awareness <= AWARE_BARELY) |
| 10422 | { |
| 10423 | if(memory->mode != SNIPER_BASE) |
| 10424 | { |
| 10425 | SetMode(me, SNIPER_BASE); |
| 10426 | } |
| 10427 | |
| 10428 | return; |
| 10429 | }*/ |
| 10430 | } |
| 10431 | |
| 10432 | if (memorycxx . . $ SniperNoRun#memory.->time_till_next_modecxx . . $ snipernorun_data#time_till_next_mode. < memorycxx . . $ SniperNoRun#memory.->mode_timecxx . . $ snipernorun_data#mode_time.) { |
| 10433 | if (memorycxx . . $ SniperNoRun#memory.->modecxx . . $ snipernorun_data#mode. == SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!) |
| 10434 | SetModecxx . . $ SniperNoRun#SetMode(5016a63d0a5aceb0).(me, SNIPER_SNIPEcxx . . $ `scripts/AIGame.cpp:941:9`!); |
| 10435 | else |
| 10436 | SetModecxx . . $ SniperNoRun#SetMode(5016a63d0a5aceb0).(me, SNIPER_BASEcxx . . $ `scripts/AIGame.cpp:940:9`!); |
| 10437 | } |
| 10438 | |
| 10439 | memorycxx . . $ SniperNoRun#memory.->mode_timecxx . . $ snipernorun_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10440 | } |
| 10441 | |
| 10442 | int16_t SniperNoRuncxx . . $ SniperNoRun#::CallEventcxx . . $ SniperNoRun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10443 | switch (event) { |
| 10444 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10445 | DoInitcxx . . $ SniperNoRun#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10446 | break; |
| 10447 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 10448 | DoFramecxx . . $ SniperNoRun#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10449 | break; |
| 10450 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 10451 | return (DoNotifycxx . . $ SniperNoRun#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 10452 | break; |
| 10453 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10454 | memorycxx . . $ SniperNoRun#memory. = (snipernorun_datacxx . . $ snipernorun_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10455 | } break; |
| 10456 | } |
| 10457 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10458 | } |
| 10459 | |
| 10460 | //------------------ |
| 10461 | // Evader Mod A class |
| 10462 | //------------------ |
| 10463 | |
| 10464 | #define EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`! 0 |
| 10465 | #define EMA_GET_BEHINDcxx . . $ `scripts/AIGame.cpp:10465:9`! 1 |
| 10466 | |
| 10467 | bool EvaderModAcxx . . $ EvaderModA#::DoNotifycxx . . $ EvaderModA#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { return true; } |
| 10468 | |
| 10469 | void EvaderModAcxx . . $ EvaderModA#::SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 10470 | switch (mode) { |
| 10471 | case EMA_GET_BEHINDcxx . . $ `scripts/AIGame.cpp:10465:9`!: { |
| 10472 | vectorcxx . . $ vector# pos; |
| 10473 | int vec; |
| 10474 | |
| 10475 | int flags = GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!; |
| 10476 | |
| 10477 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10478 | vec = GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!; |
| 10479 | memorycxx . . $ EvaderModA#memory.->time_till_next_modecxx . . $ evadermoda_data#time_till_next_mode. = 7.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10480 | } else { |
| 10481 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10482 | vec = GST_NEG_RVECcxx . . $ `Descent3/aistruct_external.h:267:9`!; |
| 10483 | } else { |
| 10484 | vec = GST_RVECcxx . . $ `Descent3/aistruct_external.h:266:9`!; |
| 10485 | } |
| 10486 | memorycxx . . $ EvaderModA#memory.->time_till_next_modecxx . . $ evadermoda_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10487 | } |
| 10488 | |
| 10489 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, |
| 10490 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, vec); |
| 10491 | } break; |
| 10492 | case EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!: { |
| 10493 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ EvaderModA#memory.->base_speedcxx . . $ evadermoda_data#base_speed.); |
| 10494 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ EvaderModA#memory.->base_acccxx . . $ evadermoda_data#base_acc.); |
| 10495 | |
| 10496 | bool used; |
| 10497 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10498 | |
| 10499 | if (used) { |
| 10500 | int flags; |
| 10501 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!, &flags); |
| 10502 | |
| 10503 | if (!(flags & GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!)) { |
| 10504 | AI_ClearGoalcxx . . $ AI_ClearGoal.(me, 3); |
| 10505 | } |
| 10506 | } |
| 10507 | |
| 10508 | memorycxx . . $ EvaderModA#memory.->time_till_next_modecxx . . $ evadermoda_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 10509 | +6.0f; |
| 10510 | } break; |
| 10511 | } |
| 10512 | |
| 10513 | memorycxx . . $ EvaderModA#memory.->mode_timecxx . . $ evadermoda_data#mode_time. = 0.0f; |
| 10514 | memorycxx . . $ EvaderModA#memory.->modecxx . . $ evadermoda_data#mode. = mode; |
| 10515 | } |
| 10516 | |
| 10517 | void EvaderModAcxx . . $ EvaderModA#::DoInitcxx . . $ EvaderModA#DoInit(d4f767463ce0a6b3).(int me) { |
| 10518 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10519 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10520 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(evadermoda_datacxx . . $ evadermoda_data#); |
| 10521 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10522 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10523 | |
| 10524 | memorycxx . . $ EvaderModA#memory. = (evadermoda_datacxx . . $ evadermoda_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10525 | |
| 10526 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ EvaderModA#memory.->base_speedcxx . . $ evadermoda_data#base_speed.); |
| 10527 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ EvaderModA#memory.->base_acccxx . . $ evadermoda_data#base_acc.); |
| 10528 | |
| 10529 | SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10530 | } |
| 10531 | |
| 10532 | void EvaderModAcxx . . $ EvaderModA#::DoFramecxx . . $ EvaderModA#DoFrame(d4f767463ce0a6b3).(int me) { |
| 10533 | float awareness; |
| 10534 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 10535 | |
| 10536 | bool used; |
| 10537 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10538 | |
| 10539 | if (used) { |
| 10540 | return; |
| 10541 | } |
| 10542 | |
| 10543 | if (awareness <= AWARE_BARELYcxx . . $ `Descent3/aistruct_external.h:326:9`!) { |
| 10544 | if (memorycxx . . $ EvaderModA#memory.->modecxx . . $ evadermoda_data#mode. != EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!) { |
| 10545 | SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10546 | } |
| 10547 | |
| 10548 | return; |
| 10549 | } |
| 10550 | |
| 10551 | if (memorycxx . . $ EvaderModA#memory.->time_till_next_modecxx . . $ evadermoda_data#time_till_next_mode. < memorycxx . . $ EvaderModA#memory.->mode_timecxx . . $ evadermoda_data#mode_time.) { |
| 10552 | if (memorycxx . . $ EvaderModA#memory.->modecxx . . $ evadermoda_data#mode. == EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!) |
| 10553 | SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(me, EMA_GET_BEHINDcxx . . $ `scripts/AIGame.cpp:10465:9`!); |
| 10554 | else |
| 10555 | SetModecxx . . $ EvaderModA#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10556 | } |
| 10557 | |
| 10558 | memorycxx . . $ EvaderModA#memory.->mode_timecxx . . $ evadermoda_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10559 | } |
| 10560 | |
| 10561 | int16_t EvaderModAcxx . . $ EvaderModA#::CallEventcxx . . $ EvaderModA#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10562 | switch (event) { |
| 10563 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10564 | DoInitcxx . . $ EvaderModA#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10565 | break; |
| 10566 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 10567 | DoFramecxx . . $ EvaderModA#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10568 | break; |
| 10569 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 10570 | return (DoNotifycxx . . $ EvaderModA#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 10571 | break; |
| 10572 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10573 | memorycxx . . $ EvaderModA#memory. = (evadermoda_datacxx . . $ evadermoda_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10574 | } break; |
| 10575 | } |
| 10576 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10577 | } |
| 10578 | |
| 10579 | //------------------ |
| 10580 | // FlameRAS |
| 10581 | //------------------ |
| 10582 | |
| 10583 | // Based off EvaderModA |
| 10584 | |
| 10585 | bool FlameRAScxx . . $ FlameRAS#::DoNotifycxx . . $ FlameRAS#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { return true; } |
| 10586 | |
| 10587 | void FlameRAScxx . . $ FlameRAS#::SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 10588 | switch (mode) { |
| 10589 | case EMA_GET_BEHINDcxx . . $ `scripts/AIGame.cpp:10465:9`!: { |
| 10590 | vectorcxx . . $ vector# pos; |
| 10591 | int vec; |
| 10592 | |
| 10593 | int flags = GF_NOTIFIEScxx . . $ `Descent3/aistruct_external.h:219:9`! | GF_ORIENT_TARGETcxx . . $ `Descent3/aistruct_external.h:233:9`!; |
| 10594 | |
| 10595 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10596 | vec = GST_NEG_FVECcxx . . $ `Descent3/aistruct_external.h:265:9`!; |
| 10597 | memorycxx . . $ FlameRAS#memory.->time_till_next_modecxx . . $ flameras_data#time_till_next_mode. = 7.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10598 | } else { |
| 10599 | if ((randcxx . . $ rand(9efc7249d839d30e).() % 100) > 50) { |
| 10600 | vec = GST_NEG_RVECcxx . . $ `Descent3/aistruct_external.h:267:9`!; |
| 10601 | } else { |
| 10602 | vec = GST_RVECcxx . . $ `Descent3/aistruct_external.h:266:9`!; |
| 10603 | } |
| 10604 | memorycxx . . $ FlameRAS#memory.->time_till_next_modecxx . . $ flameras_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + 2.0f; |
| 10605 | } |
| 10606 | |
| 10607 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_MOVE_RELATIVE_OBJ_VECcxx . . $ `Descent3/aistruct_external.h:199:9`!, 0, 1.0f, -1, GF_SPEED_ATTACKcxx . . $ `Descent3/aistruct_external.h:252:9`! | GF_KEEP_AT_COMPLETIONcxx . . $ `Descent3/aistruct_external.h:218:9`! | GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`!, |
| 10608 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, vec); |
| 10609 | } break; |
| 10610 | case EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!: { |
| 10611 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ FlameRAS#memory.->base_speedcxx . . $ flameras_data#base_speed.); |
| 10612 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ FlameRAS#memory.->base_acccxx . . $ flameras_data#base_acc.); |
| 10613 | |
| 10614 | bool used; |
| 10615 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10616 | |
| 10617 | if (used) { |
| 10618 | int flags; |
| 10619 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_I_FLAGScxx . . $ `scripts/osiris_common.h:602:9`!, &flags); |
| 10620 | |
| 10621 | if (!(flags & GF_NONFLUSHABLEcxx . . $ `Descent3/aistruct_external.h:216:9`!)) { |
| 10622 | AI_ClearGoalcxx . . $ AI_ClearGoal.(me, 3); |
| 10623 | } |
| 10624 | } |
| 10625 | |
| 10626 | memorycxx . . $ FlameRAS#memory.->time_till_next_modecxx . . $ flameras_data#time_till_next_mode. = 4.0f * (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!; |
| 10627 | +6.0f; |
| 10628 | } break; |
| 10629 | } |
| 10630 | |
| 10631 | memorycxx . . $ FlameRAS#memory.->mode_timecxx . . $ flameras_data#mode_time. = 0.0f; |
| 10632 | memorycxx . . $ FlameRAS#memory.->modecxx . . $ flameras_data#mode. = mode; |
| 10633 | } |
| 10634 | |
| 10635 | void FlameRAScxx . . $ FlameRAS#::DoInitcxx . . $ FlameRAS#DoInit(d4f767463ce0a6b3).(int me) { |
| 10636 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10637 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10638 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(flameras_datacxx . . $ flameras_data#); |
| 10639 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10640 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10641 | |
| 10642 | memorycxx . . $ FlameRAS#memory. = (flameras_datacxx . . $ flameras_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10643 | |
| 10644 | memorycxx . . $ FlameRAS#memory.->time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle. = 3.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + (float)Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 10645 | memorycxx . . $ FlameRAS#memory.->f_firing_okcxx . . $ flameras_data#f_firing_ok. = true; |
| 10646 | |
| 10647 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_SPEEDcxx . . $ `scripts/osiris_common.h:505:9`!, &memorycxx . . $ FlameRAS#memory.->base_speedcxx . . $ flameras_data#base_speed.); |
| 10648 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_MAX_DELTA_SPEEDcxx . . $ `scripts/osiris_common.h:506:9`!, &memorycxx . . $ FlameRAS#memory.->base_acccxx . . $ flameras_data#base_acc.); |
| 10649 | |
| 10650 | SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10651 | } |
| 10652 | |
| 10653 | void FlameRAScxx . . $ FlameRAS#::DoFramecxx . . $ FlameRAS#DoFrame(d4f767463ce0a6b3).(int me) { |
| 10654 | float awareness; |
| 10655 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 10656 | |
| 10657 | bool used; |
| 10658 | AI_GoalValuecxx . . $ AI_GoalValue(bf765428094b1867).(me, 3, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIGV_B_USEDcxx . . $ `scripts/osiris_common.h:618:9`!, &used); |
| 10659 | |
| 10660 | if (memorycxx . . $ FlameRAS#memory.->time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle. <= 0.0f) { |
| 10661 | if (memorycxx . . $ FlameRAS#memory.->f_firing_okcxx . . $ flameras_data#f_firing_ok.) { |
| 10662 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 10663 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 10664 | |
| 10665 | memorycxx . . $ FlameRAS#memory.->time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle. = 5.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + ((float)Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.() - 3.0f); |
| 10666 | memorycxx . . $ FlameRAS#memory.->f_firing_okcxx . . $ flameras_data#f_firing_ok. = false; |
| 10667 | } else { |
| 10668 | int flags = AIF_DISABLE_FIRINGcxx . . $ `Descent3/aistruct_external.h:374:9`!; |
| 10669 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 10670 | |
| 10671 | memorycxx . . $ FlameRAS#memory.->time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle. = 4.0f + (float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`! + (float)Game_GetDiffLevelcxx . . $ Game_GetDiffLevel.(); |
| 10672 | memorycxx . . $ FlameRAS#memory.->f_firing_okcxx . . $ flameras_data#f_firing_ok. = true; |
| 10673 | } |
| 10674 | } |
| 10675 | |
| 10676 | if (used) { |
| 10677 | return; |
| 10678 | } |
| 10679 | |
| 10680 | if (awareness <= AWARE_BARELYcxx . . $ `Descent3/aistruct_external.h:326:9`!) { |
| 10681 | if (memorycxx . . $ FlameRAS#memory.->modecxx . . $ flameras_data#mode. != EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!) { |
| 10682 | SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10683 | } |
| 10684 | |
| 10685 | return; |
| 10686 | } |
| 10687 | |
| 10688 | if (memorycxx . . $ FlameRAS#memory.->time_till_next_modecxx . . $ flameras_data#time_till_next_mode. < memorycxx . . $ FlameRAS#memory.->mode_timecxx . . $ flameras_data#mode_time.) { |
| 10689 | if (memorycxx . . $ FlameRAS#memory.->modecxx . . $ flameras_data#mode. == EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!) |
| 10690 | SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(me, EMA_GET_BEHINDcxx . . $ `scripts/AIGame.cpp:10465:9`!); |
| 10691 | else |
| 10692 | SetModecxx . . $ FlameRAS#SetMode(5016a63d0a5aceb0).(me, EMA_NORMALcxx . . $ `scripts/AIGame.cpp:10464:9`!); |
| 10693 | } |
| 10694 | |
| 10695 | memorycxx . . $ FlameRAS#memory.->time_till_fire_togglecxx . . $ flameras_data#time_till_fire_toggle. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10696 | memorycxx . . $ FlameRAS#memory.->mode_timecxx . . $ flameras_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 10697 | } |
| 10698 | |
| 10699 | int16_t FlameRAScxx . . $ FlameRAS#::CallEventcxx . . $ FlameRAS#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10700 | switch (event) { |
| 10701 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10702 | DoInitcxx . . $ FlameRAS#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10703 | break; |
| 10704 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 10705 | DoFramecxx . . $ FlameRAS#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10706 | break; |
| 10707 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 10708 | return (DoNotifycxx . . $ FlameRAS#DoNotify(a880c8b99cdc05b4).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data) != false) ? CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`! : 0; |
| 10709 | break; |
| 10710 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10711 | memorycxx . . $ FlameRAS#memory. = (flameras_datacxx . . $ flameras_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10712 | } break; |
| 10713 | } |
| 10714 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10715 | } |
| 10716 | |
| 10717 | //------------------ |
| 10718 | // Seeker class |
| 10719 | //------------------ |
| 10720 | |
| 10721 | void Seekercxx . . $ Seeker#::DoInitcxx . . $ Seeker#DoInit(d4f767463ce0a6b3).(int me) { |
| 10722 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 10723 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_GET_TO_OBJcxx . . $ `Descent3/aistruct_external.h:183:9`!, 1, 1.0f, -1, GF_OBJ_IS_TARGETcxx . . $ `Descent3/aistruct_external.h:220:9`! | GF_USE_BLINE_IF_SEES_GOALcxx . . $ `Descent3/aistruct_external.h:223:9`!, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 10724 | |
| 10725 | uint16_tcxx . . $ uint16_t# id; |
| 10726 | uint16_tcxx . . $ uint16_t# humon_seeker_id; |
| 10727 | |
| 10728 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_US_IDcxx . . $ `scripts/osiris_common.h:627:9`!, &id); |
| 10729 | humon_seeker_id = Obj_FindIDcxx . . $ Obj_FindID.("HumonSeeker"); |
| 10730 | |
| 10731 | if (humon_seeker_id == id) { |
| 10732 | vectorcxx . . $ vector# velocity; |
| 10733 | matrixcxx . . $ matrix# orient; |
| 10734 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 10735 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 10736 | |
| 10737 | velocity +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 50.0f; |
| 10738 | |
| 10739 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &velocity); |
| 10740 | } |
| 10741 | |
| 10742 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(me); |
| 10743 | int sound_id = Sound_FindIdcxx . . $ Sound_FindId.("Drop bomb"); |
| 10744 | int p_type = GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(parent); |
| 10745 | |
| 10746 | if (sound_id >= 0 && p_type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 10747 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(parent, sound_id); |
| 10748 | } |
| 10749 | } |
| 10750 | |
| 10751 | void Seekercxx . . $ Seeker#::DoCollidecxx . . $ Seeker#DoCollide(d4f767463ce0a6b3).(int me) { |
| 10752 | int room; |
| 10753 | vectorcxx . . $ vector# pos; |
| 10754 | int weapon_id; |
| 10755 | |
| 10756 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 10757 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 10758 | |
| 10759 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("SeekerExplosion"); |
| 10760 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 10761 | |
| 10762 | msafe_structcxx . . $ msafe_struct# mo; |
| 10763 | mo.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 10764 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 10765 | |
| 10766 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 10767 | } |
| 10768 | |
| 10769 | int16_t Seekercxx . . $ Seeker#::CallEventcxx . . $ Seeker#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10770 | switch (event) { |
| 10771 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 10772 | DoInitcxx . . $ Seeker#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10773 | break; |
| 10774 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 10775 | DoCollidecxx . . $ Seeker#DoCollide(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10776 | break; |
| 10777 | } |
| 10778 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10779 | } |
| 10780 | |
| 10781 | // Old Osiris functions converted to make porting easier |
| 10782 | int GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(int object) { |
| 10783 | msafe_structcxx . . $ msafe_struct# ms; |
| 10784 | ms.objhandlecxx . . $ msafe_struct#objhandle. = object; |
| 10785 | |
| 10786 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_PARENTcxx . . $ `scripts/osiris_common.h:834:9`!, &ms); |
| 10787 | |
| 10788 | return ms.objhandlecxx . . $ msafe_struct#objhandle.; |
| 10789 | } |
| 10790 | |
| 10791 | int GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(int object) { |
| 10792 | msafe_structcxx . . $ msafe_struct# ms; |
| 10793 | ms.objhandlecxx . . $ msafe_struct#objhandle. = object; |
| 10794 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_TYPEcxx . . $ `scripts/osiris_common.h:812:9`!, &ms); |
| 10795 | |
| 10796 | return ms.typecxx . . $ msafe_struct#type.; |
| 10797 | } |
| 10798 | |
| 10799 | void ObjectDamagecxx . . $ ObjectDamage(d6d7ce2c0b3115db).(int object, float amount, int killer = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!); |
| 10800 | void ObjectDamagecxx . . $ ObjectDamage(d6d7ce2c0b3115db).(int object, float amount, int killer) { |
| 10801 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 10802 | |
| 10803 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = object; |
| 10804 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = killer; |
| 10805 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = GD_SCRIPTEDcxx . . $ `Descent3/damage_external.h:32:9`!; |
| 10806 | mstruct.amountcxx . . $ msafe_struct#amount. = amount; |
| 10807 | |
| 10808 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 10809 | } |
| 10810 | |
| 10811 | float GetObjectShieldscxx . . $ GetObjectShields(5cde91ea12d43f46).(int object) { |
| 10812 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 10813 | |
| 10814 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = object; |
| 10815 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_SHIELDScxx . . $ `scripts/osiris_common.h:802:9`!, &mstruct); |
| 10816 | |
| 10817 | return mstruct.shieldscxx . . $ msafe_struct#shields.; |
| 10818 | } |
| 10819 | |
| 10820 | void ObjectRemovecxx . . $ ObjectRemove(d4f767463ce0a6b3).(int object) { |
| 10821 | msafe_structcxx . . $ msafe_struct# ms; |
| 10822 | ms.objhandlecxx . . $ msafe_struct#objhandle. = object; |
| 10823 | ms.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 10824 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &ms); |
| 10825 | } |
| 10826 | |
| 10827 | //------------------ |
| 10828 | // Bouncing Betty class |
| 10829 | //------------------ |
| 10830 | |
| 10831 | int16_t BettyBombcxx . . $ BettyBomb#::CallEventcxx . . $ BettyBomb#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10832 | switch (event) { |
| 10833 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10834 | memorycxx . . $ BettyBomb#memory. = (tBettyBombInfocxx . . $ tBettyBombInfo# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10835 | } break; |
| 10836 | |
| 10837 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 10838 | // create our memory |
| 10839 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10840 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10841 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tBettyBombInfocxx . . $ tBettyBombInfo#); |
| 10842 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10843 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 10844 | |
| 10845 | memorycxx . . $ BettyBomb#memory. = (tBettyBombInfocxx . . $ tBettyBombInfo# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10846 | |
| 10847 | memorycxx . . $ BettyBomb#memory.->explodecxx . . $ tBettyBombInfo#explode. = false; |
| 10848 | |
| 10849 | // Create and release our Betty children |
| 10850 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10851 | int child_id = Obj_FindIDcxx . . $ Obj_FindID.("Betty"); |
| 10852 | |
| 10853 | if (parent != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`! && child_id != -1) { |
| 10854 | int child_handle; |
| 10855 | matrixcxx . . $ matrix# orient, o, otemp, o1; |
| 10856 | vectorcxx . . $ vector# vel, pos, v, vtemp; |
| 10857 | int room; |
| 10858 | |
| 10859 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 10860 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 10861 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 10862 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 10863 | |
| 10864 | // v = -vel; |
| 10865 | /* |
| 10866 | v = vel; |
| 10867 | float mag = vm_GetMagnitude(&v); |
| 10868 | if(mag < 30.0f ) |
| 10869 | { |
| 10870 | if(mag==0) |
| 10871 | mag = 0.001f; |
| 10872 | |
| 10873 | v /= mag; |
| 10874 | v *= 30.0f; |
| 10875 | } |
| 10876 | */ |
| 10877 | |
| 10878 | v =cxx . . $ vector#`operator=`(c0842353a20857d). -cxx . . $ operator-(9e07539e219c6f20).orient.fveccxx . . $ matrix#fvec. +cxx . . $ operator+(b77b703cd1e43e33). orient.rveccxx . . $ matrix#rvec. -cxx . . $ operator-(b77b703cd1e43e33). orient.uveccxx . . $ matrix#uvec.; |
| 10879 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&v); |
| 10880 | v *=cxx . . $ `operator*=`(f132838b2cd11d6). 30.0f; |
| 10881 | |
| 10882 | // give drop bomb sound |
| 10883 | int type = GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(parent); |
| 10884 | |
| 10885 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || type == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!) { |
| 10886 | int sound_id = Sound_FindIdcxx . . $ Sound_FindId.("Drop bomb"); |
| 10887 | |
| 10888 | if (sound_id >= 0) { |
| 10889 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(parent, sound_id); |
| 10890 | } |
| 10891 | } |
| 10892 | |
| 10893 | // First create middle Betty |
| 10894 | child_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, child_id, room, &pos, &orient, parent, &v); |
| 10895 | |
| 10896 | // Now create left Betty |
| 10897 | v =cxx . . $ vector#`operator=`(c0842353a20857d). -cxx . . $ operator-(9e07539e219c6f20).orient.fveccxx . . $ matrix#fvec. +cxx . . $ operator+(b77b703cd1e43e33). (0.3f *cxx . . $ `operator*`(9d6577ff3e9faa29). orient.rveccxx . . $ matrix#rvec.) -cxx . . $ operator-(b77b703cd1e43e33). orient.uveccxx . . $ matrix#uvec.; |
| 10898 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&v); |
| 10899 | v *=cxx . . $ `operator*=`(f132838b2cd11d6). 30.0f; |
| 10900 | child_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, child_id, room, &pos, &orient, parent, &v); |
| 10901 | |
| 10902 | // Now create right Betty |
| 10903 | v =cxx . . $ vector#`operator=`(c0842353a20857d). -cxx . . $ operator-(9e07539e219c6f20).orient.fveccxx . . $ matrix#fvec. -cxx . . $ operator-(b77b703cd1e43e33). (0.3f *cxx . . $ `operator*`(9d6577ff3e9faa29). orient.rveccxx . . $ matrix#rvec.) -cxx . . $ operator-(b77b703cd1e43e33). orient.uveccxx . . $ matrix#uvec.; |
| 10904 | vm_VectorNormalizecxx . . $ vm_VectorNormalize(4939a7e530383cd4).(&v); |
| 10905 | v *=cxx . . $ `operator*=`(f132838b2cd11d6). 30.0f; |
| 10906 | child_handle = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, child_id, room, &pos, &orient, parent, &v); |
| 10907 | } |
| 10908 | |
| 10909 | memorycxx . . $ BettyBomb#memory.->explodecxx . . $ tBettyBombInfo#explode. = true; |
| 10910 | |
| 10911 | } break; |
| 10912 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 10913 | if (memorycxx . . $ BettyBomb#memory. && memorycxx . . $ BettyBomb#memory.->explodecxx . . $ tBettyBombInfo#explode.) { |
| 10914 | ObjectRemovecxx . . $ ObjectRemove(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10915 | } |
| 10916 | } break; |
| 10917 | } |
| 10918 | |
| 10919 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 10920 | } |
| 10921 | |
| 10922 | void BettyScriptcxx . . $ BettyScript#::DoInitcxx . . $ BettyScript#DoInit(d4f767463ce0a6b3).(int me) { |
| 10923 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 10924 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 10925 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tBettyInfocxx . . $ tBettyInfo#); |
| 10926 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 10927 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 10928 | |
| 10929 | memorycxx . . $ BettyScript#memory. = (tBettyInfocxx . . $ tBettyInfo# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 10930 | |
| 10931 | memorycxx . . $ BettyScript#memory.->explodecxx . . $ tBettyInfo#explode. = false; |
| 10932 | memorycxx . . $ BettyScript#memory.->lasttimecxx . . $ tBettyInfo#lasttime. = 0; |
| 10933 | } |
| 10934 | |
| 10935 | int16_t BettyScriptcxx . . $ BettyScript#::CallEventcxx . . $ BettyScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 10936 | switch (event) { |
| 10937 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 10938 | memorycxx . . $ BettyScript#memory. = (tBettyInfocxx . . $ tBettyInfo# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 10939 | } break; |
| 10940 | |
| 10941 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 10942 | // create our memory |
| 10943 | DoInitcxx . . $ BettyScript#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10944 | |
| 10945 | int parent, type; |
| 10946 | vectorcxx . . $ vector# vel; |
| 10947 | |
| 10948 | parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10949 | |
| 10950 | if (parent != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 10951 | // Give it velocity |
| 10952 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 10953 | vel.xcxx . . $ vector#x. = vel.xcxx . . $ vector#x. * -0.5; |
| 10954 | vel.ycxx . . $ vector#y. = vel.ycxx . . $ vector#y. * -0.5; |
| 10955 | vel.zcxx . . $ vector#z. = vel.zcxx . . $ vector#z. * -0.5; |
| 10956 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 10957 | } |
| 10958 | |
| 10959 | tOSIRISTIMERcxx . . $ tOSIRISTIMER# timer_info; |
| 10960 | timer_info.flagscxx . . $ tOSIRISTIMER#flags. = 0; |
| 10961 | timer_info.repeat_countcxx . . $ tOSIRISTIMER#repeat_count. = 0; |
| 10962 | timer_info.object_handlecxx . . $ tOSIRISTIMER#$anonymous_type_2#object_handle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 10963 | timer_info.object_handle_detonatorcxx . . $ tOSIRISTIMER#object_handle_detonator. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 10964 | timer_info.timer_intervalcxx . . $ tOSIRISTIMER#timer_interval. = 15.0f; |
| 10965 | timer_info.idcxx . . $ tOSIRISTIMER#id. = CREATE_TIMER_IDcxx . . $ `scripts/AIGame.cpp:338:9`!(0x1A); |
| 10966 | Scrpt_CreateTimercxx . . $ Scrpt_CreateTimer.(&timer_info); |
| 10967 | |
| 10968 | } break; |
| 10969 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 10970 | float velmag; |
| 10971 | vectorcxx . . $ vector# vel; |
| 10972 | |
| 10973 | if (GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle.) == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 10974 | |
| 10975 | if (!memorycxx . . $ BettyScript#memory.->explodecxx . . $ tBettyInfo#explode.) { |
| 10976 | memorycxx . . $ BettyScript#memory.->explodecxx . . $ tBettyInfo#explode. = true; |
| 10977 | |
| 10978 | matrixcxx . . $ matrix# orient; |
| 10979 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 10980 | |
| 10981 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 10982 | velmag = vm_GetMagnitudecxx . . $ vm_GetMagnitude(4939a7e530383cd4).(&vel); |
| 10983 | velmag = velmag / 4; |
| 10984 | |
| 10985 | int room; |
| 10986 | vectorcxx . . $ vector# pos; |
| 10987 | int weapon_id; |
| 10988 | |
| 10989 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 10990 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 10991 | |
| 10992 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 10993 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, &orient, GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.)); |
| 10994 | |
| 10995 | ObjectDamagecxx . . $ ObjectDamage(d6d7ce2c0b3115db).(data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle., velmag, data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 10996 | } |
| 10997 | } |
| 10998 | } break; |
| 10999 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 11000 | float time, velmag, scale; |
| 11001 | vectorcxx . . $ vector# vel; |
| 11002 | |
| 11003 | time = data->evt_intervalcxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_interval..game_timecxx . . $ tOSIRISEVTINTERVAL#game_time.; |
| 11004 | |
| 11005 | if (time > memorycxx . . $ BettyScript#memory.->lasttimecxx . . $ tBettyInfo#lasttime. + 0.10) { |
| 11006 | // check to see if we need to limit speed |
| 11007 | memorycxx . . $ BettyScript#memory.->lasttimecxx . . $ tBettyInfo#lasttime. = time; |
| 11008 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 11009 | velmag = vm_GetMagnitudecxx . . $ vm_GetMagnitude(4939a7e530383cd4).(&vel); |
| 11010 | |
| 11011 | if (velmag > 120.0f) { |
| 11012 | // limit the velocity |
| 11013 | scale = 120.0f / velmag; |
| 11014 | vel.xcxx . . $ vector#x. = scale * vel.xcxx . . $ vector#x.; |
| 11015 | vel.ycxx . . $ vector#y. = scale * vel.ycxx . . $ vector#y.; |
| 11016 | vel.zcxx . . $ vector#z. = scale * vel.zcxx . . $ vector#z.; |
| 11017 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 11018 | } |
| 11019 | } |
| 11020 | |
| 11021 | if (memorycxx . . $ BettyScript#memory. && memorycxx . . $ BettyScript#memory.->explodecxx . . $ tBettyInfo#explode.) { |
| 11022 | ObjectRemovecxx . . $ ObjectRemove(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11023 | } |
| 11024 | } break; |
| 11025 | |
| 11026 | case EVT_TIMERcxx . . $ `scripts/osiris_common.h:369:9`!: { |
| 11027 | float amount; |
| 11028 | amount = GetObjectShieldscxx . . $ GetObjectShields(5cde91ea12d43f46).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.) + 10.0f; |
| 11029 | ObjectDamagecxx . . $ ObjectDamage(d6d7ce2c0b3115db).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., amount); |
| 11030 | } break; |
| 11031 | } |
| 11032 | |
| 11033 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 11034 | } |
| 11035 | |
| 11036 | //------------------ |
| 11037 | // Chaff class |
| 11038 | //------------------ |
| 11039 | |
| 11040 | void ChaffScriptcxx . . $ ChaffScript#::DoInitcxx . . $ ChaffScript#DoInit(d4f767463ce0a6b3).(int handle) { |
| 11041 | vectorcxx . . $ vector# vel, v, pos; |
| 11042 | |
| 11043 | int count, chaffcount; |
| 11044 | int chunk_id, room; |
| 11045 | int parent, ch, type; |
| 11046 | |
| 11047 | // Allocate the memory for the script |
| 11048 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# mem; |
| 11049 | mem.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 11050 | mem.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tChaffInfocxx . . $ tChaffInfo#); |
| 11051 | mem.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 11052 | mem.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = handle; |
| 11053 | |
| 11054 | memorycxx . . $ ChaffScript#memory. = (tChaffInfocxx . . $ tChaffInfo# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&mem); |
| 11055 | memorycxx . . $ ChaffScript#memory.->killmecxx . . $ tChaffInfo#killme. = false; |
| 11056 | |
| 11057 | parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(handle); |
| 11058 | chunk_id = Obj_FindIDcxx . . $ Obj_FindID.("ChaffChunk"); |
| 11059 | |
| 11060 | if (parent != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`! && chunk_id != -1) { |
| 11061 | matrixcxx . . $ matrix# orient; |
| 11062 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 11063 | |
| 11064 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 11065 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 11066 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 11067 | |
| 11068 | chaffcount = 10; |
| 11069 | for (count = 0; count < chaffcount; count++) { |
| 11070 | v =cxx . . $ vector#`operator=`(c0842353a20857d). -cxx . . $ operator-(9e07539e219c6f20).vel; |
| 11071 | v.xcxx . . $ vector#x. += (randcxx . . $ rand(9efc7249d839d30e).() % 30) - 15; |
| 11072 | v.ycxx . . $ vector#y. += (randcxx . . $ rand(9efc7249d839d30e).() % 30) - 15; |
| 11073 | v.zcxx . . $ vector#z. += (randcxx . . $ rand(9efc7249d839d30e).() % 30) - 15; |
| 11074 | |
| 11075 | ch = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!, chunk_id, room, &pos, &orient, parent, &v); |
| 11076 | } |
| 11077 | |
| 11078 | type = GetObjectTypecxx . . $ GetObjectType(7864480464b09eea).(parent); |
| 11079 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || type == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!) { |
| 11080 | int sound_id = Sound_FindIdcxx . . $ Sound_FindId.("Drop bomb"); |
| 11081 | if (sound_id >= 0) { |
| 11082 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(parent, sound_id); |
| 11083 | } |
| 11084 | } |
| 11085 | } |
| 11086 | |
| 11087 | memorycxx . . $ ChaffScript#memory.->killmecxx . . $ tChaffInfo#killme. = true; |
| 11088 | } |
| 11089 | |
| 11090 | void ChaffScriptcxx . . $ ChaffScript#::DoIntervalcxx . . $ ChaffScript#DoInterval(d4f767463ce0a6b3).(int handle) { |
| 11091 | if (memorycxx . . $ ChaffScript#memory. && memorycxx . . $ ChaffScript#memory.->killmecxx . . $ tChaffInfo#killme.) { |
| 11092 | ObjectRemovecxx . . $ ObjectRemove(d4f767463ce0a6b3).(handle); |
| 11093 | } |
| 11094 | } |
| 11095 | |
| 11096 | int16_t ChaffScriptcxx . . $ ChaffScript#::CallEventcxx . . $ ChaffScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 11097 | switch (event) { |
| 11098 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 11099 | memorycxx . . $ ChaffScript#memory. = (tChaffInfocxx . . $ tChaffInfo# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 11100 | } break; |
| 11101 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 11102 | DoInitcxx . . $ ChaffScript#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11103 | } break; |
| 11104 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 11105 | DoIntervalcxx . . $ ChaffScript#DoInterval(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11106 | } break; |
| 11107 | } |
| 11108 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 11109 | } |
| 11110 | |
| 11111 | void ChaffChunkScriptcxx . . $ ChaffChunkScript#::DoInitcxx . . $ ChaffChunkScript#DoInit(d4f767463ce0a6b3).(int handle) { |
| 11112 | // Allocate the memory for the script |
| 11113 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 11114 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 11115 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(tChaffChunkInfocxx . . $ tChaffChunkInfo#); |
| 11116 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 11117 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = handle; |
| 11118 | |
| 11119 | memorycxx . . $ ChaffChunkScript#memory. = (tChaffChunkInfocxx . . $ tChaffChunkInfo# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 11120 | memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme. = false; |
| 11121 | memorycxx . . $ ChaffChunkScript#memory.->lifeleftcxx . . $ tChaffChunkInfo#lifeleft. = 30.0f; |
| 11122 | |
| 11123 | int parent; |
| 11124 | vectorcxx . . $ vector# vel; |
| 11125 | parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(handle); |
| 11126 | |
| 11127 | if (parent != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 11128 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(parent, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 11129 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 11130 | } |
| 11131 | } |
| 11132 | |
| 11133 | void ChaffChunkScriptcxx . . $ ChaffChunkScript#::DoIntervalcxx . . $ ChaffChunkScript#DoInterval(43c79ee2f1b9aefe).(int handle, float frametime) { |
| 11134 | if (!memorycxx . . $ ChaffChunkScript#memory.) |
| 11135 | return; |
| 11136 | |
| 11137 | memorycxx . . $ ChaffChunkScript#memory.->lifeleftcxx . . $ tChaffChunkInfo#lifeleft. -= frametime; |
| 11138 | if (!memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme. && memorycxx . . $ ChaffChunkScript#memory.->lifeleftcxx . . $ tChaffChunkInfo#lifeleft. < 0) { |
| 11139 | int weapon_id; |
| 11140 | matrixcxx . . $ matrix# orient; |
| 11141 | |
| 11142 | memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme. = true; |
| 11143 | |
| 11144 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 11145 | |
| 11146 | int room; |
| 11147 | vectorcxx . . $ vector# pos; |
| 11148 | |
| 11149 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 11150 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(handle, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 11151 | |
| 11152 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("ChaffSpark"); |
| 11153 | |
| 11154 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(handle); |
| 11155 | |
| 11156 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, &orient, parent); |
| 11157 | } |
| 11158 | |
| 11159 | if (memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme.) { |
| 11160 | ObjectRemovecxx . . $ ObjectRemove(d4f767463ce0a6b3).(handle); |
| 11161 | } |
| 11162 | } |
| 11163 | |
| 11164 | void ChaffChunkScriptcxx . . $ ChaffChunkScript#::DoCollidecxx . . $ ChaffChunkScript#DoCollide(67333b58276f6108).(tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 11165 | int weapon_id; |
| 11166 | matrixcxx . . $ matrix# orient; |
| 11167 | |
| 11168 | if (!memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme.) { |
| 11169 | memorycxx . . $ ChaffChunkScript#memory.->killmecxx . . $ tChaffChunkInfo#killme. = true; |
| 11170 | |
| 11171 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 11172 | |
| 11173 | int room; |
| 11174 | vectorcxx . . $ vector# pos; |
| 11175 | |
| 11176 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 11177 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 11178 | |
| 11179 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("ChaffSpark"); |
| 11180 | |
| 11181 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11182 | |
| 11183 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, &orient, parent); |
| 11184 | } |
| 11185 | } |
| 11186 | |
| 11187 | int16_t ChaffChunkScriptcxx . . $ ChaffChunkScript#::CallEventcxx . . $ ChaffChunkScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 11188 | switch (event) { |
| 11189 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 11190 | memorycxx . . $ ChaffChunkScript#memory. = (tChaffChunkInfocxx . . $ tChaffChunkInfo# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 11191 | } break; |
| 11192 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 11193 | DoInitcxx . . $ ChaffChunkScript#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11194 | } break; |
| 11195 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 11196 | DoIntervalcxx . . $ ChaffChunkScript#DoInterval(43c79ee2f1b9aefe).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., data->evt_intervalcxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_interval..frame_timecxx . . $ tOSIRISEVTINTERVAL#frame_time.); |
| 11197 | } break; |
| 11198 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 11199 | DoCollidecxx . . $ ChaffChunkScript#DoCollide(67333b58276f6108).(data); |
| 11200 | } break; |
| 11201 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: { |
| 11202 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 0.0f, 4.0f, 1.0f, 0); |
| 11203 | } break; |
| 11204 | } |
| 11205 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 11206 | } |
| 11207 | |
| 11208 | //------------------ |
| 11209 | // ProxMine class |
| 11210 | //------------------ |
| 11211 | |
| 11212 | void ProxMinecxx . . $ ProxMine#::DoInitcxx . . $ ProxMine#DoInit(d4f767463ce0a6b3).(int me) { |
| 11213 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(me); |
| 11214 | int sound_id = Sound_FindIdcxx . . $ Sound_FindId.("Drop bomb"); |
| 11215 | if (sound_id >= 0) { |
| 11216 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(parent, sound_id); |
| 11217 | } |
| 11218 | } |
| 11219 | |
| 11220 | void ProxMinecxx . . $ ProxMine#::DoCollidecxx . . $ ProxMine#DoCollide(d4f767463ce0a6b3).(int me) { |
| 11221 | int room; |
| 11222 | vectorcxx . . $ vector# pos; |
| 11223 | int weapon_id; |
| 11224 | |
| 11225 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 11226 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 11227 | |
| 11228 | weapon_id = Wpn_FindIDcxx . . $ Wpn_FindID.("TubbsHitBlast"); |
| 11229 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_WEAPONcxx . . $ `Descent3/object_external.h:165:9`!, weapon_id, room, &pos, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, me); |
| 11230 | |
| 11231 | msafe_structcxx . . $ msafe_struct# mo; |
| 11232 | mo.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 11233 | |
| 11234 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 11235 | } |
| 11236 | |
| 11237 | int16_t ProxMinecxx . . $ ProxMine#::CallEventcxx . . $ ProxMine#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 11238 | switch (event) { |
| 11239 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 11240 | DoInitcxx . . $ ProxMine#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11241 | break; |
| 11242 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: |
| 11243 | DoCollidecxx . . $ ProxMine#DoCollide(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11244 | break; |
| 11245 | } |
| 11246 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 11247 | } |
| 11248 | |
| 11249 | //------------------ |
| 11250 | // Gunboy class |
| 11251 | //------------------ |
| 11252 | int16_t Gunboycxx . . $ Gunboy#::CallEventcxx . . $ Gunboy#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 11253 | switch (event) { |
| 11254 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 11255 | int parent = GetObjectParentcxx . . $ GetObjectParent(7864480464b09eea).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 11256 | int sound_id = Sound_FindIdcxx . . $ Sound_FindId.("Drop bomb"); |
| 11257 | if (sound_id >= 0) { |
| 11258 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(parent, sound_id, 1); |
| 11259 | } |
| 11260 | |
| 11261 | tOSIRISTIMERcxx . . $ tOSIRISTIMER# timer_info; |
| 11262 | timer_info.flagscxx . . $ tOSIRISTIMER#flags. = 0; |
| 11263 | timer_info.repeat_countcxx . . $ tOSIRISTIMER#repeat_count. = 0; |
| 11264 | timer_info.object_handlecxx . . $ tOSIRISTIMER#$anonymous_type_2#object_handle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 11265 | timer_info.object_handle_detonatorcxx . . $ tOSIRISTIMER#object_handle_detonator. = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 11266 | timer_info.timer_intervalcxx . . $ tOSIRISTIMER#timer_interval. = 160.0f; |
| 11267 | timer_info.idcxx . . $ tOSIRISTIMER#id. = CREATE_TIMER_IDcxx . . $ `scripts/AIGame.cpp:338:9`!(0x2D); |
| 11268 | Scrpt_CreateTimercxx . . $ Scrpt_CreateTimer.(&timer_info); |
| 11269 | |
| 11270 | } break; |
| 11271 | |
| 11272 | case EVT_TIMERcxx . . $ `scripts/osiris_common.h:369:9`!: { |
| 11273 | float amount; |
| 11274 | amount = GetObjectShieldscxx . . $ GetObjectShields(5cde91ea12d43f46).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.) + 60.0f; |
| 11275 | ObjectDamagecxx . . $ ObjectDamage(d6d7ce2c0b3115db).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., amount); |
| 11276 | } break; |
| 11277 | } |
| 11278 | |
| 11279 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 11280 | } |