| 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 | int String_table_sizecxx . . $ String_table_size. = 0; |
| 46 | 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/aigame4.cpp:56:9`!(x) GetStringFromTable(x) |
| 57 | |
| 58 | static void PortalBreakGlasscxx . . $ PortalBreakGlass(3e454b8ccf442868).(int portalnum, int roomnum); |
| 59 | // Returns the new child's handle |
| 60 | static int CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(int me, const char *child_name, uint8_tcxx . . $ uint8_t# child_type, char parent_ap, char child_ap, |
| 61 | bool f_aligned = true, bool f_set_parent = false); |
| 62 | static float Obj_GetObjDistcxx . . $ Obj_GetObjDist(209fdf95ab79e58e).(int me, int it, bool f_sub_rads); |
| 63 | |
| 64 | void PortalBreakGlasscxx . . $ PortalBreakGlass(3e454b8ccf442868).(int portalnum, int roomnum) { |
| 65 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 66 | |
| 67 | mstruct.roomnumcxx . . $ msafe_struct#roomnum. = roomnum; |
| 68 | mstruct.portalnumcxx . . $ msafe_struct#portalnum. = portalnum; |
| 69 | |
| 70 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_ROOM_BREAK_GLASScxx . . $ `scripts/osiris_common.h:798:9`!, &mstruct); |
| 71 | } |
| 72 | |
| 73 | // Returns the new child's handle |
| 74 | 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, |
| 75 | bool f_set_parent) { |
| 76 | int child_handle = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 77 | int child_id = Obj_FindIDcxx . . $ Obj_FindID.(child_name); |
| 78 | msafe_structcxx . . $ msafe_struct# m; |
| 79 | m.objhandlecxx . . $ msafe_struct#objhandle. = me; |
| 80 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_POScxx . . $ `scripts/osiris_common.h:820:9`!, &m); |
| 81 | MSafe_GetValuecxx . . $ MSafe_GetValue.(MSAFE_OBJECT_ROOMNUMcxx . . $ `scripts/osiris_common.h:822:9`!, &m); |
| 82 | |
| 83 | if (child_id >= 0) { |
| 84 | int parent; |
| 85 | if (f_set_parent) |
| 86 | parent = me; |
| 87 | else |
| 88 | parent = OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!; |
| 89 | |
| 90 | 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); |
| 91 | if (child_handle != OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!) { |
| 92 | if (!Obj_AttachObjectAPcxx . . $ Obj_AttachObjectAP.(me, parent_ap, child_handle, child_ap, f_aligned)) { |
| 93 | // chrishack (we need a way to instantly kill scripted objects) |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | return child_handle; |
| 99 | } |
| 100 | |
| 101 | // ========================== |
| 102 | // Script class definitions// |
| 103 | // ========================== |
| 104 | #define NUM_IDScxx . . $ `scripts/aigame4.cpp:104:9`! 6 // maximum number of IDs |
| 105 | |
| 106 | #define ID_MERCENDBOSScxx . . $ `scripts/aigame4.cpp:106:9`! 0 // Mercenary End Boss |
| 107 | #define ID_GUNcxx . . $ `scripts/aigame4.cpp:107:9`! 1 // Mercenary Mino Boss for level 6 |
| 108 | #define ID_CASINGcxx . . $ `scripts/aigame4.cpp:108:9`! 2 |
| 109 | #define ID_HANGLIGHTcxx . . $ `scripts/aigame4.cpp:109:9`! 3 // Mercenary Hanging Light |
| 110 | #define ID_COMBWALLHITcxx . . $ `scripts/aigame4.cpp:110:9`! 4 // Wall hit for purple big ass gun |
| 111 | #define ID_DROPTARGETcxx . . $ `scripts/aigame4.cpp:111:9`! 5 |
| 112 | |
| 113 | struct tScriptInfocxx . . $ tScriptInfo# { |
| 114 | int idcxx . . $ tScriptInfo#id.; |
| 115 | const char *namecxx . . $ tScriptInfo#name.; |
| 116 | }; |
| 117 | |
| 118 | tScriptInfocxx . . $ tScriptInfo# ScriptInfocxx . . $ ScriptInfo.[NUM_IDScxx . . $ `scripts/aigame4.cpp:104:9`!] = {{ID_MERCENDBOSScxx . . $ `scripts/aigame4.cpp:106:9`!, "MercEndBoss"}, {ID_GUNcxx . . $ `scripts/aigame4.cpp:107:9`!, "Gun"}, |
| 119 | {ID_CASINGcxx . . $ `scripts/aigame4.cpp:108:9`!, "Casing"}, {ID_HANGLIGHTcxx . . $ `scripts/aigame4.cpp:109:9`!, "HangLight"}, |
| 120 | {ID_COMBWALLHITcxx . . $ `scripts/aigame4.cpp:110:9`!, "CombWallHit"}, {ID_DROPTARGETcxx . . $ `scripts/aigame4.cpp:111:9`!, "DropTarget"}}; |
| 121 | |
| 122 | static int aigame_mod_idcxx . . $ aigame_mod_id.; |
| 123 | // use this macro to create unique timer IDs |
| 124 | #define CREATE_TIMER_IDcxx . . $ `scripts/aigame4.cpp:124:9`!(id) ((aigame_mod_id << 16) | (id)) |
| 125 | |
| 126 | class BaseObjScriptcxx . . $ BaseObjScript# { |
| 127 | public: |
| 128 | BaseObjScriptcxx . . $ BaseObjScript#BaseObjScript(49f6e7a06ebc5aa8).(); |
| 129 | ~cxx . . $ BaseObjScript#`~BaseObjScript`(ced63f7c635d850d).BaseObjScriptcxx . . $ BaseObjScript#(); |
| 130 | virtual int16_t CallEventcxx . . $ BaseObjScript#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 131 | }; |
| 132 | |
| 133 | struct tShieldOrbInfocxx . . $ tShieldOrbInfo# { |
| 134 | int hitcountcxx . . $ tShieldOrbInfo#hitcount.; |
| 135 | }; |
| 136 | |
| 137 | //------------------ |
| 138 | // CombWallHit class |
| 139 | //------------------ |
| 140 | |
| 141 | struct combwallhit_datacxx . . $ combwallhit_data# { |
| 142 | float time_leftcxx . . $ combwallhit_data#time_left.; |
| 143 | }; |
| 144 | |
| 145 | class CombWallHitcxx . . $ CombWallHit# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 146 | private: |
| 147 | combwallhit_datacxx . . $ combwallhit_data# *memorycxx . . $ CombWallHit#memory.; |
| 148 | |
| 149 | public: |
| 150 | CombWallHitcxx . . $ CombWallHit#CombWallHit(49f6e7a06ebc5aa8).() {} |
| 151 | int16_t CallEventcxx . . $ CombWallHit#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 152 | }; |
| 153 | |
| 154 | //------------------ |
| 155 | // DropTarget class |
| 156 | //------------------ |
| 157 | |
| 158 | struct droptarget_datacxx . . $ droptarget_data# { |
| 159 | float time_leftcxx . . $ droptarget_data#time_left.; |
| 160 | float last_set_timecxx . . $ droptarget_data#last_set_time.; |
| 161 | }; |
| 162 | |
| 163 | class DropTargetcxx . . $ DropTarget# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 164 | private: |
| 165 | droptarget_datacxx . . $ droptarget_data# *memorycxx . . $ DropTarget#memory.; |
| 166 | |
| 167 | public: |
| 168 | DropTargetcxx . . $ DropTarget#DropTarget(49f6e7a06ebc5aa8).() {} |
| 169 | int16_t CallEventcxx . . $ DropTarget#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 170 | }; |
| 171 | |
| 172 | //------------------ |
| 173 | // Gun class |
| 174 | //------------------ |
| 175 | |
| 176 | struct gun_datacxx . . $ gun_data# { |
| 177 | int shell_idcxx . . $ gun_data#shell_id.; |
| 178 | bool f_firecxx . . $ gun_data#f_fire.; |
| 179 | }; |
| 180 | |
| 181 | class Guncxx . . $ Gun# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 182 | gun_datacxx . . $ gun_data# *memorycxx . . $ Gun#memory.; |
| 183 | |
| 184 | public: |
| 185 | Guncxx . . $ Gun#Gun(49f6e7a06ebc5aa8).() {} |
| 186 | int16_t CallEventcxx . . $ Gun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 187 | }; |
| 188 | |
| 189 | //------------------ |
| 190 | // Casing class |
| 191 | //------------------ |
| 192 | |
| 193 | struct casing_datacxx . . $ casing_data# { |
| 194 | float time_leftcxx . . $ casing_data#time_left.; |
| 195 | }; |
| 196 | |
| 197 | class Casingcxx . . $ Casing# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 198 | private: |
| 199 | casing_datacxx . . $ casing_data# *memorycxx . . $ Casing#memory.; |
| 200 | |
| 201 | public: |
| 202 | Casingcxx . . $ Casing#Casing(49f6e7a06ebc5aa8).() {} |
| 203 | int16_t CallEventcxx . . $ Casing#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 204 | }; |
| 205 | |
| 206 | //------------------ |
| 207 | // MercEndBoss class |
| 208 | //------------------ |
| 209 | |
| 210 | #define MERCENDBOSS_WAITcxx . . $ `scripts/aigame4.cpp:210:9`! 0 |
| 211 | #define MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`! 1 |
| 212 | #define MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`! 2 |
| 213 | #define MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`! 3 |
| 214 | #define MERCENDBOSS_DEATH_BLOSSUMcxx . . $ `scripts/aigame4.cpp:214:9`! 4 |
| 215 | #define MERCENDBOSS_DEATHcxx . . $ `scripts/aigame4.cpp:215:9`! 5 |
| 216 | |
| 217 | // Mercenary End Boss Unique Goal IDs |
| 218 | #define MEB_TURN_TOWARDS_CAMERAcxx . . $ `scripts/aigame4.cpp:218:9`! 0x00010001 |
| 219 | |
| 220 | struct mercendboss_datacxx . . $ mercendboss_data# { |
| 221 | int flagscxx . . $ mercendboss_data#flags.; |
| 222 | char modecxx . . $ mercendboss_data#mode.; |
| 223 | char next_modecxx . . $ mercendboss_data#next_mode.; |
| 224 | int turret_objectcxx . . $ mercendboss_data#turret_object.; |
| 225 | |
| 226 | bool f_target_ghostcxx . . $ mercendboss_data#f_target_ghost.; |
| 227 | float time_till_firecxx . . $ mercendboss_data#time_till_fire.; |
| 228 | |
| 229 | int wallhit_idcxx . . $ mercendboss_data#wallhit_id.; |
| 230 | |
| 231 | bool f_orientedcxx . . $ mercendboss_data#f_oriented.; |
| 232 | |
| 233 | float last_framecxx . . $ mercendboss_data#last_frame.; |
| 234 | |
| 235 | int laser_soundcxx . . $ mercendboss_data#laser_sound.; |
| 236 | float laser_time_leftcxx . . $ mercendboss_data#laser_time_left.; |
| 237 | |
| 238 | bool f_sub_supercxx . . $ mercendboss_data#f_sub_super.; |
| 239 | float mode_timecxx . . $ mercendboss_data#mode_time.; |
| 240 | float sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left.; |
| 241 | |
| 242 | float last_spark_timecxx . . $ mercendboss_data#last_spark_time.; |
| 243 | |
| 244 | float time_to_next_random_soundcxx . . $ mercendboss_data#time_to_next_random_sound.; |
| 245 | |
| 246 | int emittercxx . . $ mercendboss_data#emitter.[2]; |
| 247 | int cameracxx . . $ mercendboss_data#camera.; |
| 248 | int combine_objectcxx . . $ mercendboss_data#combine_object.; |
| 249 | }; |
| 250 | |
| 251 | class MercEndBosscxx . . $ MercEndBoss# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 252 | private: |
| 253 | mercendboss_datacxx . . $ mercendboss_data# *memorycxx . . $ MercEndBoss#memory.; |
| 254 | void DoInitcxx . . $ MercEndBoss#DoInit(d4f767463ce0a6b3).(int me); |
| 255 | void DoFramecxx . . $ MercEndBoss#DoFrame(d4f767463ce0a6b3).(int me); |
| 256 | bool DoNotifycxx . . $ MercEndBoss#DoNotify(a880c8b99cdc05b4).(int me_handle, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 257 | void SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(int me, char mode); |
| 258 | void SetSupercxx . . $ MercEndBoss#SetSuper(918ebd27a9ddbad3).(int obj, bool f_super); |
| 259 | float GetSubModeTimecxx . . $ MercEndBoss#GetSubModeTime(9b8c9e39889c762c).(void); |
| 260 | void PlayRandomSoundcxx . . $ MercEndBoss#PlayRandomSound(d4f767463ce0a6b3).(int me); |
| 261 | |
| 262 | public: |
| 263 | MercEndBosscxx . . $ MercEndBoss#MercEndBoss(49f6e7a06ebc5aa8).() {} |
| 264 | int16_t CallEventcxx . . $ MercEndBoss#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 265 | }; |
| 266 | |
| 267 | //------------------ |
| 268 | // HangLight class |
| 269 | //------------------ |
| 270 | |
| 271 | class HangLightcxx . . $ HangLight# : public BaseObjScriptcxx . . $ BaseObjScript# { |
| 272 | private: |
| 273 | void DoInitcxx . . $ HangLight#DoInit(d4f767463ce0a6b3).(int me); |
| 274 | |
| 275 | public: |
| 276 | HangLightcxx . . $ HangLight#HangLight(49f6e7a06ebc5aa8).() {} |
| 277 | int16_t CallEventcxx . . $ HangLight#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data); |
| 278 | }; |
| 279 | |
| 280 | //---------------- |
| 281 | // Standard stuff |
| 282 | //---------------- |
| 283 | |
| 284 | // SaveRestoreState |
| 285 | // Purpose: |
| 286 | // This function is called when Descent 3 is saving or restoring the game state. In this function |
| 287 | // you should save/restore any global data that you want preserved through load/save (which includes |
| 288 | // demos). You must be very careful with this function, corrupting the file (reading or writing too |
| 289 | // much or too little) may be hazardous to the game (possibly making it impossible to restore the |
| 290 | // state). It would be best to use version information to keep older versions of saved states still |
| 291 | // able to be used. IT IS VERY IMPORTANT WHEN SAVING THE STATE TO RETURN THE NUMBER OF _BYTES_ WROTE |
| 292 | // TO THE FILE. When restoring the data, the return value is ignored. saving_state is 1 when you should |
| 293 | // write data to the file_ptr, 0 when you should read in the data. |
| 294 | int STDCALLcxx . . $ `lib/module.h:88:11`! SaveRestoreStatecxx . . $ SaveRestoreState(5276b51c10b71c09).(void *file_ptr, uint8_tcxx . . $ uint8_t# saving_state) { return 0; } |
| 295 | |
| 296 | char STDCALLcxx . . $ `lib/module.h:88:11`! InitializeDLLcxx . . $ InitializeDLL(f9aae224659b2173).(tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *func_list) { |
| 297 | osicommon_Initializecxx . . $ osicommon_Initialize(5a9437a4d944b175).((tOSIRISModuleInitcxx . . $ tOSIRISModuleInit# *)func_list); |
| 298 | if (func_list->game_checksumcxx . . $ tOSIRISModuleInit#game_checksum. != CHECKSUMcxx . . $ `<built-in>:476:9`!) { |
| 299 | mprintfcxx . . $ mprintf.(0, "Game-Checksum FAIL!!! (%ul!=%ul)\n", func_list->game_checksumcxx . . $ tOSIRISModuleInit#game_checksum., CHECKSUMcxx . . $ `<built-in>:476:9`!); |
| 300 | mprintfcxx . . $ mprintf.(0, "RECOMPILE YOUR SCRIPTS!!!\n"); |
| 301 | return 0; |
| 302 | } |
| 303 | aigame_mod_idcxx . . $ aigame_mod_id. = func_list->module_identifiercxx . . $ tOSIRISModuleInit#module_identifier.; |
| 304 | String_table_sizecxx . . $ String_table_size. = func_list->string_countcxx . . $ tOSIRISModuleInit#string_count.; |
| 305 | String_tablecxx . . $ String_table. = func_list->string_tablecxx . . $ tOSIRISModuleInit#string_table.; |
| 306 | |
| 307 | return 1; |
| 308 | } |
| 309 | |
| 310 | void STDCALLcxx . . $ `lib/module.h:88:11`! ShutdownDLLcxx . . $ ShutdownDLL(49f6e7a06ebc5aa8).(void) {} |
| 311 | |
| 312 | int STDCALLcxx . . $ `lib/module.h:88:11`! GetGOScriptIDcxx . . $ GetGOScriptID(a2648ab7e2ef960e).(const char *name, uint8_tcxx . . $ uint8_t# isdoor) { |
| 313 | for (int i = 0; i < NUM_IDScxx . . $ `scripts/aigame4.cpp:104:9`!; i++) { |
| 314 | if (!stricmpcxx . . $ `linux/linux_fix.h:43:9`!(name, ScriptInfo[i].name)) { |
| 315 | return ScriptInfocxx . . $ ScriptInfo.[i].idcxx . . $ tScriptInfo#id.; |
| 316 | } |
| 317 | } |
| 318 | return -1; |
| 319 | } |
| 320 | |
| 321 | void STDCALLPTRcxx . . $ `lib/module.h:90:10`! CreateInstancecxx . . $ CreateInstance(d1680a912d714170).(int id) { |
| 322 | switch (id) { |
| 323 | case ID_MERCENDBOSScxx . . $ `scripts/aigame4.cpp:106:9`!: |
| 324 | return new MercEndBosscxx . . $ MercEndBoss#; |
| 325 | break; |
| 326 | case ID_GUNcxx . . $ `scripts/aigame4.cpp:107:9`!: |
| 327 | return new Guncxx . . $ Gun#; |
| 328 | break; |
| 329 | case ID_CASINGcxx . . $ `scripts/aigame4.cpp:108:9`!: |
| 330 | return new Casingcxx . . $ Casing#; |
| 331 | break; |
| 332 | case ID_HANGLIGHTcxx . . $ `scripts/aigame4.cpp:109:9`!: |
| 333 | return new HangLightcxx . . $ HangLight#; |
| 334 | break; |
| 335 | case ID_COMBWALLHITcxx . . $ `scripts/aigame4.cpp:110:9`!: |
| 336 | return new CombWallHitcxx . . $ CombWallHit#; |
| 337 | break; |
| 338 | case ID_DROPTARGETcxx . . $ `scripts/aigame4.cpp:111:9`!: |
| 339 | return new DropTargetcxx . . $ DropTarget#; |
| 340 | break; |
| 341 | default: |
| 342 | mprintfcxx . . $ mprintf.(0, "SCRIPT: Illegal ID (%d)\n", id); |
| 343 | break; |
| 344 | }; |
| 345 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 346 | } |
| 347 | |
| 348 | void STDCALLcxx . . $ `lib/module.h:88:11`! DestroyInstancecxx . . $ DestroyInstance(6ca3d68f5c5f0975).(int id, void *ptr) { |
| 349 | switch (id) { |
| 350 | case ID_MERCENDBOSScxx . . $ `scripts/aigame4.cpp:106:9`!: |
| 351 | delete ((MercEndBosscxx . . $ MercEndBoss# *)ptr); |
| 352 | break; |
| 353 | case ID_GUNcxx . . $ `scripts/aigame4.cpp:107:9`!: |
| 354 | delete ((Guncxx . . $ Gun# *)ptr); |
| 355 | break; |
| 356 | case ID_CASINGcxx . . $ `scripts/aigame4.cpp:108:9`!: |
| 357 | delete ((Casingcxx . . $ Casing# *)ptr); |
| 358 | break; |
| 359 | case ID_HANGLIGHTcxx . . $ `scripts/aigame4.cpp:109:9`!: |
| 360 | delete ((HangLightcxx . . $ HangLight# *)ptr); |
| 361 | break; |
| 362 | case ID_COMBWALLHITcxx . . $ `scripts/aigame4.cpp:110:9`!: |
| 363 | delete ((CombWallHitcxx . . $ CombWallHit# *)ptr); |
| 364 | break; |
| 365 | case ID_DROPTARGETcxx . . $ `scripts/aigame4.cpp:111:9`!: |
| 366 | delete ((DropTargetcxx . . $ DropTarget# *)ptr); |
| 367 | break; |
| 368 | default: |
| 369 | mprintfcxx . . $ mprintf.(0, "SCRIPT: Illegal ID (%d)\n", id); |
| 370 | break; |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | int16_t STDCALLcxx . . $ `lib/module.h:88:11`! CallInstanceEventcxx . . $ CallInstanceEvent(79be2a5a01598f29).(int id, void *ptr, int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 375 | return ((BaseObjScriptcxx . . $ BaseObjScript# *)ptr)->CallEventcxx . . $ BaseObjScript#CallEvent(585a6502c7945bab).(event, data); |
| 376 | } |
| 377 | |
| 378 | //============================================ |
| 379 | // Functions |
| 380 | //============================================ |
| 381 | |
| 382 | float Obj_GetObjDistcxx . . $ Obj_GetObjDist(209fdf95ab79e58e).(int me, int it, bool f_sub_rads) { |
| 383 | vectorcxx . . $ vector# me_pos; |
| 384 | vectorcxx . . $ vector# it_pos; |
| 385 | float dist; |
| 386 | |
| 387 | 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); |
| 388 | 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); |
| 389 | |
| 390 | dist = vm_VectorDistancecxx . . $ vm_VectorDistance(e65d563e2b53cc54).(&me_pos, &it_pos); |
| 391 | |
| 392 | if (f_sub_rads) { |
| 393 | float size; |
| 394 | |
| 395 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SIZEcxx . . $ `scripts/osiris_common.h:636:9`!, &size); |
| 396 | dist -= size; |
| 397 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(it, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SIZEcxx . . $ `scripts/osiris_common.h:636:9`!, &size); |
| 398 | dist -= size; |
| 399 | } |
| 400 | |
| 401 | return dist; |
| 402 | } |
| 403 | |
| 404 | static inline void AIClearNonHPGoalscxx . . $ AIClearNonHPGoals(d4f767463ce0a6b3).(int handle) { |
| 405 | int i; |
| 406 | |
| 407 | for (i = 0; i < MAX_GOALScxx . . $ `Descent3/aistruct_external.h:178:9`!; i++) { |
| 408 | if (i != 3) |
| 409 | AI_ClearGoalcxx . . $ AI_ClearGoal.(handle, i); |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | static inline bool IsGoalFinishedNotifycxx . . $ IsGoalFinishedNotify(83c267b20bac841a).(int index) { |
| 414 | 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`!); |
| 415 | } |
| 416 | |
| 417 | //============================================ |
| 418 | // Script Implementation |
| 419 | //============================================ |
| 420 | BaseObjScriptcxx . . $ BaseObjScript#::BaseObjScriptcxx . . $ BaseObjScript#BaseObjScript(49f6e7a06ebc5aa8).() {} |
| 421 | |
| 422 | BaseObjScriptcxx . . $ BaseObjScript#::~cxx . . $ BaseObjScript#`~BaseObjScript`(ced63f7c635d850d).BaseObjScriptcxx . . $ BaseObjScript#() {} |
| 423 | |
| 424 | 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`!; } |
| 425 | |
| 426 | //------------------ |
| 427 | // MercEndBoss class |
| 428 | //------------------ |
| 429 | |
| 430 | #define MATTER_TIMEcxx . . $ `scripts/aigame4.cpp:430:9`! 10.0f |
| 431 | #define MATTER_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:431:9`! 10.0f |
| 432 | #define ENERGY_TIMEcxx . . $ `scripts/aigame4.cpp:432:9`! 20.0f |
| 433 | #define ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`! 10.0f |
| 434 | |
| 435 | float MercEndBosscxx . . $ MercEndBoss#::GetSubModeTimecxx . . $ MercEndBoss#GetSubModeTime(9b8c9e39889c762c).(void) { |
| 436 | if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`!) { |
| 437 | if (memorycxx . . $ MercEndBoss#memory.->f_sub_supercxx . . $ mercendboss_data#f_sub_super.) { |
| 438 | return MATTER_TIMEcxx . . $ `scripts/aigame4.cpp:430:9`!; |
| 439 | } else { |
| 440 | return MATTER_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:431:9`!; |
| 441 | } |
| 442 | } else { |
| 443 | if (memorycxx . . $ MercEndBoss#memory.->f_sub_supercxx . . $ mercendboss_data#f_sub_super.) { |
| 444 | return ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!; |
| 445 | } else { |
| 446 | return ENERGY_TIMEcxx . . $ `scripts/aigame4.cpp:432:9`!; |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | void MercEndBosscxx . . $ MercEndBoss#::SetSupercxx . . $ MercEndBoss#SetSuper(918ebd27a9ddbad3).(int obj, bool f_super) { |
| 452 | int me = obj; |
| 453 | memorycxx . . $ MercEndBoss#memory.->f_sub_supercxx . . $ mercendboss_data#f_sub_super. = f_super; |
| 454 | |
| 455 | if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`!) { |
| 456 | if (f_super) { |
| 457 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0.0f, 5.0f, 0.5f, AIAF_LOOPINGcxx . . $ `Descent3/aistruct_external.h:115:9`!, Sound_FindIdcxx . . $ Sound_FindId.("MercFBWinding"), AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 458 | |
| 459 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 460 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 461 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 462 | |
| 463 | // flags = DWBF_ENABLED; |
| 464 | // Obj_WBValue(me, 0, VF_CLEAR_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 465 | // Obj_WBValue(me, 4, VF_CLEAR_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 466 | } else { |
| 467 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0.0f, 0.0f, 0.5f, AIAF_NOTIFYcxx . . $ `Descent3/aistruct_external.h:116:9`!, -1, AS_ALERTcxx . . $ `Descent3/aistruct_external.h:409:9`!); |
| 468 | |
| 469 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 470 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 471 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 472 | |
| 473 | // flags = DWBF_ENABLED; |
| 474 | // Obj_WBValue(me, 0, VF_SET_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 475 | // Obj_WBValue(me, 4, VF_SET_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 476 | } |
| 477 | } else if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`!) { |
| 478 | // int flags = DWBF_ENABLED; |
| 479 | // |
| 480 | // Obj_WBValue(me, 0, VF_CLEAR_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 481 | // Obj_WBValue(me, 4, VF_CLEAR_FLAGS, WBV_I_DYNAMIC_FLAGS, &flags); |
| 482 | |
| 483 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 484 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 485 | |
| 486 | if (f_super) { |
| 487 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(0, memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.); |
| 488 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(0, memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0]); |
| 489 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(0, memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1]); |
| 490 | |
| 491 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBBeamCanon")); |
| 492 | |
| 493 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0], memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 3.0f, 1, |
| 494 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.0f, 1, 255, 255, 255, true); |
| 495 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0], memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 2.8f, 1, |
| 496 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.95f, 1, 255, 255, 255, true); |
| 497 | |
| 498 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1], memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 3.0f, 1, |
| 499 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.0f, 1, 255, 255, 255, true); |
| 500 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1], memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 2.8f, 1, |
| 501 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.96f, 1, 255, 255, 255, true); |
| 502 | |
| 503 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 3.0f, 1, |
| 504 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.0f, 1, 255, 255, 255, true); |
| 505 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`!, 2.8f, 1, |
| 506 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.96f, 1, 255, 255, 255, true); |
| 507 | |
| 508 | float max_speed = 8500.0f; |
| 509 | 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); |
| 510 | |
| 511 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 512 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 513 | } else { |
| 514 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(1, memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.); |
| 515 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(1, memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0]); |
| 516 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(1, memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1]); |
| 517 | |
| 518 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 519 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 520 | |
| 521 | float max_speed = 10100.0f; |
| 522 | 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); |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. = GetSubModeTimecxx . . $ MercEndBoss#GetSubModeTime(9b8c9e39889c762c).(); |
| 527 | } |
| 528 | |
| 529 | #define DEATH_ROT_ACCcxx . . $ `scripts/aigame4.cpp:529:9`! 5000.0f |
| 530 | |
| 531 | bool MercEndBosscxx . . $ MercEndBoss#::DoNotifycxx . . $ MercEndBoss#DoNotify(a880c8b99cdc05b4).(int me, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 532 | switch (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode.) { |
| 533 | case MERCENDBOSS_WAITcxx . . $ `scripts/aigame4.cpp:210:9`!: { |
| 534 | 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`!) { |
| 535 | SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(me, MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`!); |
| 536 | } |
| 537 | } break; |
| 538 | case MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`!: { |
| 539 | switch (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type.) { |
| 540 | case AIN_MOVIE_ENDcxx . . $ `Descent3/aistruct_external.h:313:9`!: |
| 541 | SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(me, MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`!); |
| 542 | break; |
| 543 | case AIN_SCRIPTED_ORIENTcxx . . $ `Descent3/aistruct_external.h:311:9`!: { |
| 544 | vectorcxx . . $ vector# uvec = {0.0f, 1.0f, 0.0f}; |
| 545 | vectorcxx . . $ vector# fvec = {-1.0f, 0.0f, 0.0f}; |
| 546 | if (AI_TurnTowardsVectorscxx . . $ AI_TurnTowardsVectors.(me, &fvec, &uvec)) { |
| 547 | memorycxx . . $ MercEndBoss#memory.->f_orientedcxx . . $ mercendboss_data#f_oriented. = true; |
| 548 | } |
| 549 | } break; |
| 550 | case AIN_SCRIPTED_GOALcxx . . $ `Descent3/aistruct_external.h:304:9`!: |
| 551 | vectorcxx . . $ vector# zv = {0.0f, 0.0f, 0.0f}; |
| 552 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_V_MOVEMENT_DIRcxx . . $ `scripts/osiris_common.h:535:9`!, &zv); |
| 553 | break; |
| 554 | } |
| 555 | } break; |
| 556 | case MERCENDBOSS_DEATHcxx . . $ `scripts/aigame4.cpp:215:9`!: { |
| 557 | // NOTE: I am also doing the rotational stuff here... So, no need to make a seperate AIN_SCRIPTED_ORIENT event |
| 558 | 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`!) { |
| 559 | vectorcxx . . $ vector# rvel; |
| 560 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:632:9`!, &rvel); |
| 561 | |
| 562 | rvel.xcxx . . $ vector#x. -= 0.1f * DEATH_ROT_ACCcxx . . $ `scripts/aigame4.cpp:529:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 563 | rvel.ycxx . . $ vector#y. -= DEATH_ROT_ACCcxx . . $ `scripts/aigame4.cpp:529:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 564 | rvel.zcxx . . $ vector#z. += 0.3f * DEATH_ROT_ACCcxx . . $ `scripts/aigame4.cpp:529:9`! * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 565 | |
| 566 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_ROTVELOCITYcxx . . $ `scripts/osiris_common.h:632:9`!, &rvel); |
| 567 | |
| 568 | vectorcxx . . $ vector# dir = Zero_vectorcxx . . $ Zero_vector.; |
| 569 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_V_MOVEMENT_DIRcxx . . $ `scripts/osiris_common.h:535:9`!, &dir); |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | return true; |
| 575 | } |
| 576 | |
| 577 | void MercEndBosscxx . . $ MercEndBoss#::SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(int me, char mode) { |
| 578 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_EVADER1cxx . . $ `Descent3/aistruct_external.h:76:9`!); |
| 579 | memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. = 0.0f; |
| 580 | |
| 581 | if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`!) { |
| 582 | mprintfcxx . . $ mprintf.(0, "Here end of intro\n"); |
| 583 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 584 | 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); |
| 585 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 4, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 586 | |
| 587 | // The (AIF_DETERMINE_TARGET | AIF_AIM) flags get set here to make absolute sure that no timing issues mess things |
| 588 | // up |
| 589 | flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`! | AIF_DODGEcxx . . $ `Descent3/aistruct_external.h:355:9`! | AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`! | AIF_AIMcxx . . $ `Descent3/aistruct_external.h:359:9`!; |
| 590 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 591 | |
| 592 | int i; |
| 593 | |
| 594 | for (i = 0; i < 16; i++) { |
| 595 | PortalBreakGlasscxx . . $ PortalBreakGlass(3e454b8ccf442868).(i, 167); |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | switch (mode) { |
| 600 | case MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`!: { |
| 601 | mprintfcxx . . $ mprintf.(0, "Here intro begin\n"); |
| 602 | |
| 603 | // Make him fire during the cinematics :) |
| 604 | int flags = AISR_OK_TO_FIRE_DURING_CINEMATICScxx . . $ `Descent3/aistruct_external.h:401:9`!; |
| 605 | 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); |
| 606 | |
| 607 | // Make sure he doesn't sleep |
| 608 | flags = AIF_FORCE_AWARENESScxx . . $ `Descent3/aistruct_external.h:380:9`!; |
| 609 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 610 | |
| 611 | float awareness = AWARE_FULLYcxx . . $ `Descent3/aistruct_external.h:323:9`!; |
| 612 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_AWARENESScxx . . $ `scripts/osiris_common.h:555:9`!, &awareness); |
| 613 | |
| 614 | // Destroy all non-boss robots |
| 615 | aDestroyAllRobotsInitcxx . . $ aDestroyAllRobotsInit(49f6e7a06ebc5aa8).(); |
| 616 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(me); |
| 617 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object.); |
| 618 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0]); |
| 619 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1]); |
| 620 | aDestroyAllRobotsSpareHandlecxx . . $ aDestroyAllRobotsSpareHandle(d4f767463ce0a6b3).(memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.); |
| 621 | aDestroyAllRobotsEndcxx . . $ aDestroyAllRobotsEnd(49f6e7a06ebc5aa8).(); |
| 622 | |
| 623 | // flags = AIF_FIRE; |
| 624 | // AI_Value(me, VF_SET_FLAGS, AIV_I_FLAGS, &flags); |
| 625 | // AI_Value(memory->turret_object, VF_CLEAR_FLAGS, AIV_I_FLAGS, &flags); |
| 626 | |
| 627 | flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 628 | 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); |
| 629 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 4, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 630 | } break; |
| 631 | case MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`!: { |
| 632 | aShowHUDMessagecxx . . $ aShowHUDMessage(326aeb464d16410c).("GUIDEBOT: We should stay as far away from him as we can."); |
| 633 | |
| 634 | int flags = AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`! | AIF_AIMcxx . . $ `Descent3/aistruct_external.h:359:9`!; |
| 635 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 636 | |
| 637 | flags = AISR_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:399:9`!; |
| 638 | 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); |
| 639 | mprintfcxx . . $ mprintf.(0, "Here matter\n"); |
| 640 | } break; |
| 641 | case MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`!: { |
| 642 | aShowHUDMessagecxx . . $ aShowHUDMessage(326aeb464d16410c).("GUIDEBOT: Wow! We better get behind him."); |
| 643 | |
| 644 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(me, 1.0f, 5.0f, 2.0f, 0, Sound_FindIdcxx . . $ Sound_FindId.("MercFBServo"), -1); |
| 645 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 646 | 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`! | |
| 647 | 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`!, |
| 648 | 0.0f, 0.0f); |
| 649 | memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "FinalbossLITTLETIT", OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!, 0, 0, true, true); |
| 650 | |
| 651 | aObjSparkcxx . . $ aObjSpark(3b3943b4e4191a93).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 15, 1000000.0f); |
| 652 | |
| 653 | float tl; |
| 654 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_F_LEAD_ACCURACYcxx . . $ `scripts/osiris_common.h:545:9`!, &tl); |
| 655 | tl *= 0.8f; |
| 656 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_LEAD_ACCURACYcxx . . $ `scripts/osiris_common.h:545:9`!, &tl); |
| 657 | |
| 658 | aTurnOnSpewcxx . . $ aTurnOnSpew(145b60b86cd2d6d7).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0, MED_SMOKE_INDEXcxx . . $ `Descent3/fireball_external.h:29:9`!, 10.0f, .001f, PF_REVERSE_GRAVITYcxx . . $ `Descent3/object_external.h:329:9`!, 0, 1.0f, .05f, 100000.0f, |
| 659 | 2.0f, 0.0, -1, -1); |
| 660 | } break; |
| 661 | case MERCENDBOSS_DEATH_BLOSSUMcxx . . $ `scripts/aigame4.cpp:214:9`!: |
| 662 | break; |
| 663 | case MERCENDBOSS_DEATHcxx . . $ `scripts/aigame4.cpp:215:9`!: { |
| 664 | AI_SetTypecxx . . $ AI_SetType.(me, AIT_AIScxx . . $ `Descent3/aistruct_external.h:79:9`!); |
| 665 | |
| 666 | int flags = AIF_FIREcxx . . $ `Descent3/aistruct_external.h:356:9`!; |
| 667 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 668 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 669 | |
| 670 | vectorcxx . . $ vector# vel = {0.0f, 0.0f, 0.0f}; |
| 671 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_VELOCITYcxx . . $ `scripts/osiris_common.h:631:9`!, &vel); |
| 672 | |
| 673 | 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`!); |
| 674 | |
| 675 | float drag = 0.0f; |
| 676 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_F_ROTDRAGcxx . . $ `scripts/osiris_common.h:640:9`!, &drag); |
| 677 | |
| 678 | flags = PF_LEVELINGcxx . . $ `Descent3/object_external.h:314:9`!; |
| 679 | 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); |
| 680 | // float circle_dist = -1.0f; |
| 681 | // AI_Value(me, VF_SET, AIV_F_CIRCLE_DIST, &circle_dist); |
| 682 | |
| 683 | // Obj_SetCustomAnim(me, 495.0f, 650.0f, 15.0f, 0, Sound_FindId("RbtMercEndBossDeath"), -1); |
| 684 | } break; |
| 685 | default: |
| 686 | break; |
| 687 | } |
| 688 | |
| 689 | memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. = mode; |
| 690 | SetSupercxx . . $ MercEndBoss#SetSuper(918ebd27a9ddbad3).(me, false); |
| 691 | } |
| 692 | |
| 693 | void MercEndBosscxx . . $ MercEndBoss#::DoInitcxx . . $ MercEndBoss#DoInit(d4f767463ce0a6b3).(int me) { |
| 694 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 695 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 696 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(mercendboss_datacxx . . $ mercendboss_data#); |
| 697 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 698 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = me; |
| 699 | int i; |
| 700 | |
| 701 | memorycxx . . $ MercEndBoss#memory. = (mercendboss_datacxx . . $ mercendboss_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 702 | memorycxx . . $ MercEndBoss#memory.->flagscxx . . $ mercendboss_data#flags. = 0; |
| 703 | memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. = MERCENDBOSS_WAITcxx . . $ `scripts/aigame4.cpp:210:9`!; |
| 704 | |
| 705 | memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object. = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "FinalbossBIGGUN", OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!, 0, 0, true, true); |
| 706 | |
| 707 | int proom; |
| 708 | vectorcxx . . $ vector# ppos; |
| 709 | matrixcxx . . $ matrix# porient; |
| 710 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 711 | |
| 712 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &proom); |
| 713 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &ppos); |
| 714 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &porient); |
| 715 | |
| 716 | memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id. = Obj_FindIDcxx . . $ Obj_FindID.("Finalbosswallhit"); |
| 717 | |
| 718 | memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object. = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("FinalbossBEAMCOMBINE"), proom, &ppos, &porient, me); |
| 719 | mprintfcxx . . $ mprintf.(0, "OBJECT COMB is %d\n", memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.); |
| 720 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(1, memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.); |
| 721 | |
| 722 | memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera. = Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, Obj_FindIDcxx . . $ Obj_FindID.("Invisiblepowerup"), proom, &ppos, &porient, me); |
| 723 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera.; |
| 724 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_NO_RENDERcxx . . $ `scripts/osiris_common.h:840:9`!, &mstruct); |
| 725 | |
| 726 | for (i = 0; i < 2; i++) { |
| 727 | if (i == 0) |
| 728 | memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Finalbossemitter", OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!, 1 + i, 0, true, true); |
| 729 | else |
| 730 | memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[i] = CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "Finalbossemitterleft", OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!, 1 + i, 0, true, true); |
| 731 | |
| 732 | aObjGhostSetcxx . . $ aObjGhostSet(3e454b8ccf442868).(1, memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[i]); |
| 733 | } |
| 734 | |
| 735 | memorycxx . . $ MercEndBoss#memory.->laser_soundcxx . . $ mercendboss_data#laser_sound. = -1; |
| 736 | memorycxx . . $ MercEndBoss#memory.->last_framecxx . . $ mercendboss_data#last_frame. = 0.0f; |
| 737 | memorycxx . . $ MercEndBoss#memory.->laser_time_leftcxx . . $ mercendboss_data#laser_time_left. = 0.0f; |
| 738 | |
| 739 | memorycxx . . $ MercEndBoss#memory.->f_orientedcxx . . $ mercendboss_data#f_oriented. = false; |
| 740 | |
| 741 | memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost. = false; |
| 742 | memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. = 0.0f; |
| 743 | |
| 744 | int flags = AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`!; |
| 745 | AI_Valuecxx . . $ AI_Value.(me, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 746 | |
| 747 | memorycxx . . $ MercEndBoss#memory.->last_spark_timecxx . . $ mercendboss_data#last_spark_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 748 | memorycxx . . $ MercEndBoss#memory.->time_to_next_random_soundcxx . . $ mercendboss_data#time_to_next_random_sound. = 0.0f; |
| 749 | |
| 750 | SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(me, MERCENDBOSS_WAITcxx . . $ `scripts/aigame4.cpp:210:9`!); |
| 751 | } |
| 752 | |
| 753 | void MercEndBosscxx . . $ MercEndBoss#::PlayRandomSoundcxx . . $ MercEndBoss#PlayRandomSound(d4f767463ce0a6b3).(int me) { |
| 754 | memorycxx . . $ MercEndBoss#memory.->time_to_next_random_soundcxx . . $ mercendboss_data#time_to_next_random_sound. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 755 | if (memorycxx . . $ MercEndBoss#memory.->time_to_next_random_soundcxx . . $ mercendboss_data#time_to_next_random_sound. < 0.0f) { |
| 756 | switch (randcxx . . $ rand(9efc7249d839d30e).() % 9) { |
| 757 | case 0: |
| 758 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBDanger1")); |
| 759 | break; |
| 760 | case 1: |
| 761 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBDanger2")); |
| 762 | break; |
| 763 | case 2: |
| 764 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBDanger3")); |
| 765 | break; |
| 766 | case 3: |
| 767 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBDanger4")); |
| 768 | break; |
| 769 | case 4: |
| 770 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBIntruder1")); |
| 771 | break; |
| 772 | case 5: |
| 773 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBIntruder2")); |
| 774 | break; |
| 775 | case 6: |
| 776 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBIntruder3")); |
| 777 | break; |
| 778 | case 7: |
| 779 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBIntruder4")); |
| 780 | break; |
| 781 | case 8: |
| 782 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBIntruder5")); |
| 783 | break; |
| 784 | } |
| 785 | |
| 786 | memorycxx . . $ MercEndBoss#memory.->time_to_next_random_soundcxx . . $ mercendboss_data#time_to_next_random_sound. = (((float)randcxx . . $ rand(9efc7249d839d30e).() / (float)RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:87:9`!) * 3.0f) + 3.0f; |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | void MercEndBosscxx . . $ MercEndBoss#::DoFramecxx . . $ MercEndBoss#DoFrame(d4f767463ce0a6b3).(int me) { |
| 791 | float frame; |
| 792 | float shields; |
| 793 | |
| 794 | 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); |
| 795 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_F_SHIELDScxx . . $ `scripts/osiris_common.h:625:9`!, &shields); |
| 796 | |
| 797 | if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`! || memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`!) { |
| 798 | int target; |
| 799 | int type; |
| 800 | AI_Valuecxx . . $ AI_Value.(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_I_TARGET_HANDLEcxx . . $ `scripts/osiris_common.h:524:9`!, &target); |
| 801 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(target, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_TYPEcxx . . $ `scripts/osiris_common.h:626:9`!, &type); |
| 802 | int flags = 0; |
| 803 | |
| 804 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) { |
| 805 | Player_Valuecxx . . $ Player_Value(504a19c195c7574e).(target, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, PLYV_I_FLAGScxx . . $ `scripts/osiris_common.h:481:9`!, &flags); |
| 806 | } |
| 807 | |
| 808 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! && (flags & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!)) { |
| 809 | memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost. = true; |
| 810 | memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. = 3.0f; |
| 811 | |
| 812 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 813 | 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); |
| 814 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 4, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 815 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 816 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 1, VF_CLEAR_FLAGScxx . . $ `scripts/osiris_common.h:452:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 817 | } else if (memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost.) { |
| 818 | memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 819 | if (memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. <= 0.0f) { |
| 820 | memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. = 0.0f; |
| 821 | memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost. = false; |
| 822 | |
| 823 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 824 | 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); |
| 825 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 4, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 826 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 827 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 1, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 828 | } |
| 829 | } |
| 830 | } else if (memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost.) { |
| 831 | memorycxx . . $ MercEndBoss#memory.->time_till_firecxx . . $ mercendboss_data#time_till_fire. = 0.0f; |
| 832 | memorycxx . . $ MercEndBoss#memory.->f_target_ghostcxx . . $ mercendboss_data#f_target_ghost. = false; |
| 833 | |
| 834 | int flags = DWBF_ENABLEDcxx . . $ `lib/robotfirestruct_external.h:43:9`!; |
| 835 | 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); |
| 836 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(me, 4, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 837 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 0, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 838 | Obj_WBValuecxx . . $ Obj_WBValue(27bdf1633c0da5e1).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., 1, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, WBV_I_DYNAMIC_FLAGScxx . . $ `scripts/osiris_common.h:661:9`!, &flags); |
| 839 | } |
| 840 | |
| 841 | if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_WAITcxx . . $ `scripts/aigame4.cpp:210:9`!) { |
| 842 | } else if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_INTROcxx . . $ `scripts/aigame4.cpp:211:9`!) { |
| 843 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. > 4.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 9.0f) { |
| 844 | if (!memorycxx . . $ MercEndBoss#memory.->f_orientedcxx . . $ mercendboss_data#f_oriented.) { |
| 845 | int flags = AISR_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:399:9`!; |
| 846 | 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); |
| 847 | } else { |
| 848 | int flags = AIF_DETERMINE_TARGETcxx . . $ `Descent3/aistruct_external.h:358:9`! | AIF_AIMcxx . . $ `Descent3/aistruct_external.h:359:9`!; |
| 849 | AI_Valuecxx . . $ AI_Value.(me, VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_FLAGScxx . . $ `scripts/osiris_common.h:556:9`!, &flags); |
| 850 | |
| 851 | flags = AISR_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:399:9`!; |
| 852 | 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); |
| 853 | } |
| 854 | } else if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 5.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 4.0f) { |
| 855 | AI_AddGoalcxx . . $ AI_AddGoal.(me, AIG_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:197:9`!, 3, 1.0f, MEB_TURN_TOWARDS_CAMERAcxx . . $ `scripts/aigame4.cpp:218:9`!, GF_ORIENT_SCRIPTEDcxx . . $ `Descent3/aistruct_external.h:234:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 856 | } |
| 857 | |
| 858 | } else if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_DEATHcxx . . $ `scripts/aigame4.cpp:215:9`!) { |
| 859 | int flags = AISR_RANGED_ATTACKcxx . . $ `Descent3/aistruct_external.h:399:9`!; |
| 860 | 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); |
| 861 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_SET_FLAGScxx . . $ `scripts/osiris_common.h:451:9`!, AIV_I_STATUS_REGcxx . . $ `scripts/osiris_common.h:557:9`!, &flags); |
| 862 | |
| 863 | if (memorycxx . . $ MercEndBoss#memory.->last_spark_timecxx . . $ mercendboss_data#last_spark_time. + .1f < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 864 | memorycxx . . $ MercEndBoss#memory.->last_spark_timecxx . . $ mercendboss_data#last_spark_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 865 | |
| 866 | int room; |
| 867 | vectorcxx . . $ vector# pos; |
| 868 | |
| 869 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 870 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 871 | |
| 872 | Game_CreateRandomSparkscxx . . $ Game_CreateRandomSparks(3e6b82e54d72ee3b).(15, &pos, room); |
| 873 | } |
| 874 | |
| 875 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 5.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 5.0f) { |
| 876 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBError1")); |
| 877 | } |
| 878 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 10.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 10.0f) { |
| 879 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBError2")); |
| 880 | } |
| 881 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 15.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 15.0f) { |
| 882 | Sound_Play3dcxx . . $ Sound_Play3d(1df3af30621f6c78).(me, Sound_FindIdcxx . . $ Sound_FindId.("MercFBError3")); |
| 883 | } |
| 884 | |
| 885 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. < 3.0f && memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. + Game_GetFrameTimecxx . . $ Game_GetFrameTime.() >= 3.0f) { |
| 886 | Obj_Burningcxx . . $ Obj_Burning(3b3943b4e4191a93).(me, 1000000.0f, 1.0f); |
| 887 | } |
| 888 | |
| 889 | if (memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. > 20.0f) { |
| 890 | Obj_Killcxx . . $ Obj_Kill.(me, OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 891 | 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`!, |
| 892 | 0.0f, 0.0f); |
| 893 | // Obj_Kill(me, OBJECT_HANDLE_NONE, 1000.0f, |
| 894 | // DF_BREAKS_APART|DF_BLAST_RING|DF_LOSES_ANTIGRAV|DF_EXPL_LARGE|DF_CONTACT_BREAKS_APART|DF_CONTACT_BLAST_RING|DF_DEBRIS_SMOKES|DF_DEBRIS_FIREBALL|DF_DEBRIS_BLAST_RING, |
| 895 | // 0.0f, 0.0f); |
| 896 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 897 | 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`! | |
| 898 | 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`!, |
| 899 | 0.0f, 0.0f); |
| 900 | |
| 901 | aShowHUDMessagecxx . . $ aShowHUDMessage(326aeb464d16410c).("GUIDEBOT: I love this job."); |
| 902 | } |
| 903 | } else if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_MATTERcxx . . $ `scripts/aigame4.cpp:212:9`!) { |
| 904 | int flags; |
| 905 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 906 | |
| 907 | if (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) { |
| 908 | SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(me, MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`!); |
| 909 | } |
| 910 | |
| 911 | PlayRandomSoundcxx . . $ MercEndBoss#PlayRandomSound(d4f767463ce0a6b3).(me); |
| 912 | } else if (memorycxx . . $ MercEndBoss#memory.->modecxx . . $ mercendboss_data#mode. == MERCENDBOSS_ENERGYcxx . . $ `scripts/aigame4.cpp:213:9`!) { |
| 913 | if (memorycxx . . $ MercEndBoss#memory.->f_sub_supercxx . . $ mercendboss_data#f_sub_super.) { |
| 914 | if (memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. > ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`! - 1.5f && |
| 915 | memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. - Game_GetFrameTimecxx . . $ Game_GetFrameTime.() <= ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`! - 1.5f) { |
| 916 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`! - 1.5f, 6.0f, 1, |
| 917 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 1.0f, 1, 255, 255, 255, true); |
| 918 | aLightningCreatecxx . . $ aLightningCreate(485de53fc2b521b2).(memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera., ENERGY_SUPER_TIMEcxx . . $ `scripts/aigame4.cpp:433:9`! - 1.5f, 6.0f, 1, |
| 919 | Scrpt_FindTextureNamecxx . . $ Scrpt_FindTextureName.("endbossbeamweapon2"), 3.1111f, 1, 255, 255, 255, true); |
| 920 | } |
| 921 | |
| 922 | vectorcxx . . $ vector# pos; |
| 923 | matrixcxx . . $ matrix# orient; |
| 924 | vectorcxx . . $ vector# start_pos; |
| 925 | vectorcxx . . $ vector# end_pos; |
| 926 | vectorcxx . . $ vector# collision_pos; |
| 927 | vectorcxx . . $ vector# collision_normal; |
| 928 | int num_iterations = 0; |
| 929 | int num_ignore = 0; |
| 930 | int ignore_list[100]; |
| 931 | int fate; |
| 932 | ray_infocxx . . $ ray_info# ray; |
| 933 | |
| 934 | int room = 76; |
| 935 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_M_ORIENTcxx . . $ `scripts/osiris_common.h:629:9`!, &orient); |
| 936 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 937 | |
| 938 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 50.0f) +cxx . . $ operator+(b77b703cd1e43e33). (orient.uveccxx . . $ matrix#uvec. *cxx . . $ `operator*`(252247219a31502c). 2.0f); |
| 939 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 940 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 941 | start_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). pos; |
| 942 | |
| 943 | pos +=cxx . . $ `operator+=`(801a8d6f7ab7bef9). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 1200.0f); |
| 944 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_V_POScxx . . $ `scripts/osiris_common.h:628:9`!, &pos); |
| 945 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_I_ROOMNUMcxx . . $ `scripts/osiris_common.h:630:9`!, &room); |
| 946 | end_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). pos; |
| 947 | |
| 948 | if (memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. <= 8.5f) { |
| 949 | ignore_list[num_ignore++] = memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera.; |
| 950 | ignore_list[num_ignore++] = memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[0]; |
| 951 | ignore_list[num_ignore++] = memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[1]; |
| 952 | ignore_list[num_ignore++] = me; |
| 953 | ignore_list[num_ignore++] = memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object.; |
| 954 | ignore_list[num_ignore++] = memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.; |
| 955 | ignore_list[num_ignore++] = -1; |
| 956 | |
| 957 | vectorcxx . . $ vector# saved_start = start_pos; |
| 958 | |
| 959 | do { |
| 960 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_PI_HACK_FVI_IGNORE_LISTcxx . . $ `scripts/osiris_common.h:653:9`!, ignore_list); |
| 961 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &start_pos, &end_pos, 76, 13.0f, |
| 962 | (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_OBJ_BACKFACEcxx . . $ `lib/findintersection_external.h:60:9`! | FQ_BACKFACEcxx . . $ `lib/findintersection_external.h:63:9`! | |
| 963 | FQ_PLAYERS_AS_SPHEREcxx . . $ `lib/findintersection_external.h:81:9`! | FQ_IGNORE_WALLScxx . . $ `lib/findintersection_external.h:70:9`! | FQ_NO_RELINKcxx . . $ `lib/findintersection_external.h:73:9`!), |
| 964 | &ray); |
| 965 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, OBJV_PI_HACK_FVI_IGNORE_LISTcxx . . $ `scripts/osiris_common.h:653:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 966 | |
| 967 | if (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 968 | start_pos =cxx . . $ vector#`operator=`(c0842353a20857d). ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 13.0f); |
| 969 | } |
| 970 | |
| 971 | if (fate == HIT_OBJECTcxx . . $ `lib/findintersection_external.h:47:9`! || fate == HIT_SPHERE_2_POLY_OBJECTcxx . . $ `lib/findintersection_external.h:52:9`!) { |
| 972 | int type; |
| 973 | |
| 974 | 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); |
| 975 | |
| 976 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 977 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 978 | |
| 979 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = ray.hit_objectcxx . . $ ray_info#hit_object.; |
| 980 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = me; |
| 981 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = PD_ENERGY_WEAPONcxx . . $ `Descent3/damage_external.h:24:9`!; |
| 982 | mstruct.amountcxx . . $ msafe_struct#amount. = 10.0f * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 983 | |
| 984 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 985 | |
| 986 | // if(ray.hit_wallnorm * orient.fvec <= 0.0f) |
| 987 | // { |
| 988 | vectorcxx . . $ vector# bf_pos = ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 3.0f); |
| 989 | // vector bf_pos = ray.hit_point + (orient.fvec * |
| 990 | //-9.0f); |
| 991 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id., 76, &bf_pos); |
| 992 | // //mprintf(0, "HERE X\n"); |
| 993 | // } |
| 994 | // else |
| 995 | // { |
| 996 | // vector bf_pos = ray.hit_point + (orient.fvec |
| 997 | //* 9.0f); Obj_Create(OBJ_POWERUP, |
| 998 | // memory->wallhit_id, 76, &bf_pos); |
| 999 | /// //mprintf(0, "HERE X\n"); |
| 1000 | // } |
| 1001 | } |
| 1002 | |
| 1003 | ignore_list[num_ignore++] = ray.hit_objectcxx . . $ ray_info#hit_object.; |
| 1004 | } |
| 1005 | ignore_list[num_ignore] = -1; |
| 1006 | |
| 1007 | num_iterations++; |
| 1008 | } while (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`! && num_iterations < 10); |
| 1009 | |
| 1010 | start_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). saved_start; |
| 1011 | num_iterations = 0; |
| 1012 | |
| 1013 | // CHECK THE WALLS |
| 1014 | do { |
| 1015 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &start_pos, &end_pos, 76, 0.0f, FQ_NO_RELINKcxx . . $ `lib/findintersection_external.h:73:9`!, &ray); |
| 1016 | |
| 1017 | if (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 1018 | start_pos =cxx . . $ vector#`operator=`(c0842353a20857d). ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 5.0f); |
| 1019 | |
| 1020 | if (ray.hit_wallnormcxx . . $ ray_info#hit_wallnorm. *cxx . . $ `operator*`(4a721543d64e126a). orient.fveccxx . . $ matrix#fvec. <= 0.0f) { |
| 1021 | vectorcxx . . $ vector# bf_pos = ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). -9.0f); |
| 1022 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id., 76, &bf_pos); |
| 1023 | // mprintf(0, "HERE X\n"); |
| 1024 | } else { |
| 1025 | vectorcxx . . $ vector# bf_pos = ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 9.0f); |
| 1026 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id., 76, &bf_pos); |
| 1027 | // mprintf(0, "HERE X\n"); |
| 1028 | } |
| 1029 | } |
| 1030 | |
| 1031 | num_iterations++; |
| 1032 | } while (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`! && num_iterations < 10); |
| 1033 | |
| 1034 | start_pos =cxx . . $ vector#`operator=`(a48bc7e93a8dae5e). saved_start; |
| 1035 | num_iterations = 0; |
| 1036 | |
| 1037 | // CHECK THE WALLS |
| 1038 | do { |
| 1039 | fate = FVI_RayCastcxx . . $ FVI_RayCast.(OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, &end_pos, &start_pos, 76, 0.0f, FQ_NO_RELINKcxx . . $ `lib/findintersection_external.h:73:9`!, &ray); |
| 1040 | |
| 1041 | if (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`!) { |
| 1042 | end_pos =cxx . . $ vector#`operator=`(c0842353a20857d). ray.hit_pointcxx . . $ ray_info#hit_point. -cxx . . $ operator-(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 5.0f); |
| 1043 | |
| 1044 | if (ray.hit_wallnormcxx . . $ ray_info#hit_wallnorm. *cxx . . $ `operator*`(4a721543d64e126a). orient.fveccxx . . $ matrix#fvec. <= 0.0f) { |
| 1045 | vectorcxx . . $ vector# bf_pos = ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). -9.0f); |
| 1046 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id., 76, &bf_pos); |
| 1047 | // mprintf(0, "HERE X\n"); |
| 1048 | } else { |
| 1049 | vectorcxx . . $ vector# bf_pos = ray.hit_pointcxx . . $ ray_info#hit_point. +cxx . . $ operator+(b77b703cd1e43e33). (orient.fveccxx . . $ matrix#fvec. *cxx . . $ `operator*`(252247219a31502c). 9.0f); |
| 1050 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, memorycxx . . $ MercEndBoss#memory.->wallhit_idcxx . . $ mercendboss_data#wallhit_id., 76, &bf_pos); |
| 1051 | // mprintf(0, "HERE X\n"); |
| 1052 | } |
| 1053 | } |
| 1054 | |
| 1055 | num_iterations++; |
| 1056 | } while (fate != HIT_NONEcxx . . $ `lib/findintersection_external.h:45:9`! && num_iterations < 10); |
| 1057 | |
| 1058 | float last_see_game_time = Game_GetTimecxx . . $ Game_GetTime.(); |
| 1059 | AI_Valuecxx . . $ AI_Value.(me, VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_game_time); |
| 1060 | AI_Valuecxx . . $ AI_Value.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_SETcxx . . $ `scripts/osiris_common.h:449:9`!, AIV_F_LAST_SEE_TARGET_TIMEcxx . . $ `scripts/osiris_common.h:530:9`!, &last_see_game_time); |
| 1061 | } |
| 1062 | } else { |
| 1063 | int flags; |
| 1064 | Obj_Valuecxx . . $ Obj_Value(504a19c195c7574e).(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, OBJV_I_FLAGScxx . . $ `scripts/osiris_common.h:635:9`!, &flags); |
| 1065 | |
| 1066 | if (flags & OF_AI_DEATHcxx . . $ `Descent3/object_external.h:293:9`!) { |
| 1067 | SetModecxx . . $ MercEndBoss#SetMode(5016a63d0a5aceb0).(me, MERCENDBOSS_DEATHcxx . . $ `scripts/aigame4.cpp:215:9`!); |
| 1068 | } |
| 1069 | } |
| 1070 | |
| 1071 | PlayRandomSoundcxx . . $ MercEndBoss#PlayRandomSound(d4f767463ce0a6b3).(me); |
| 1072 | } |
| 1073 | |
| 1074 | memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1075 | if (memorycxx . . $ MercEndBoss#memory.->sub_mode_time_leftcxx . . $ mercendboss_data#sub_mode_time_left. <= 0.0f) { |
| 1076 | SetSupercxx . . $ MercEndBoss#SetSuper(918ebd27a9ddbad3).(me, !memorycxx . . $ MercEndBoss#memory.->f_sub_supercxx . . $ mercendboss_data#f_sub_super.); |
| 1077 | } |
| 1078 | |
| 1079 | memorycxx . . $ MercEndBoss#memory.->mode_timecxx . . $ mercendboss_data#mode_time. += Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1080 | memorycxx . . $ MercEndBoss#memory.->last_framecxx . . $ mercendboss_data#last_frame. = frame; |
| 1081 | } |
| 1082 | |
| 1083 | int16_t MercEndBosscxx . . $ MercEndBoss#::CallEventcxx . . $ MercEndBoss#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1084 | switch (event) { |
| 1085 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 1086 | int type; |
| 1087 | 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); |
| 1088 | |
| 1089 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 1090 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 1091 | |
| 1092 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle.; |
| 1093 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1094 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = PD_ENERGY_WEAPONcxx . . $ `Descent3/damage_external.h:24:9`!; |
| 1095 | mstruct.amountcxx . . $ msafe_struct#amount. = 50.0f * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1096 | |
| 1097 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 1098 | } |
| 1099 | } break; |
| 1100 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: |
| 1101 | DoInitcxx . . $ MercEndBoss#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 1102 | break; |
| 1103 | case EVT_AI_FRAMEcxx . . $ `scripts/osiris_common.h:364:9`!: |
| 1104 | DoFramecxx . . $ MercEndBoss#DoFrame(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 1105 | break; |
| 1106 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 1107 | return (DoNotifycxx . . $ MercEndBoss#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; |
| 1108 | break; |
| 1109 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 1110 | // shake players |
| 1111 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 1112 | mstruct.amountcxx . . $ msafe_struct#amount. = 90.0f; |
| 1113 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_VIEWER_SHAKEcxx . . $ `scripts/osiris_common.h:843:9`!, &mstruct); |
| 1114 | |
| 1115 | Obj_Killcxx . . $ Obj_Kill.(memorycxx . . $ MercEndBoss#memory.->turret_objectcxx . . $ mercendboss_data#turret_object., OBJECT_HANDLE_NONEcxx . . $ `Descent3/object_external.h:156:9`!, 1000.0f, |
| 1116 | 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, |
| 1117 | 0.0f); |
| 1118 | |
| 1119 | int i; |
| 1120 | msafe_structcxx . . $ msafe_struct# mo; |
| 1121 | |
| 1122 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ MercEndBoss#memory.->cameracxx . . $ mercendboss_data#camera.; |
| 1123 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 1124 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 1125 | |
| 1126 | for (i = 0; i < 2; i++) { |
| 1127 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ MercEndBoss#memory.->emittercxx . . $ mercendboss_data#emitter.[i]; |
| 1128 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 1129 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 1130 | } |
| 1131 | |
| 1132 | mo.objhandlecxx . . $ msafe_struct#objhandle. = memorycxx . . $ MercEndBoss#memory.->combine_objectcxx . . $ mercendboss_data#combine_object.; |
| 1133 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 1134 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 1135 | } break; |
| 1136 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 1137 | memorycxx . . $ MercEndBoss#memory. = (mercendboss_datacxx . . $ mercendboss_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 1138 | } break; |
| 1139 | } |
| 1140 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1141 | } |
| 1142 | |
| 1143 | //------------------ |
| 1144 | // Gun class |
| 1145 | //------------------ |
| 1146 | |
| 1147 | int16_t Guncxx . . $ Gun#::CallEventcxx . . $ Gun#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1148 | switch (event) { |
| 1149 | case EVT_AI_INITcxx . . $ `scripts/osiris_common.h:372:9`!: { |
| 1150 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 1151 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 1152 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(gun_datacxx . . $ gun_data#); |
| 1153 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 1154 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1155 | |
| 1156 | memorycxx . . $ Gun#memory. = (gun_datacxx . . $ gun_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 1157 | memorycxx . . $ Gun#memory.->shell_idcxx . . $ gun_data#shell_id. = Obj_FindIDcxx . . $ Obj_FindID.("finalbossshellcasing"); |
| 1158 | memorycxx . . $ Gun#memory.->f_firecxx . . $ gun_data#f_fire. = true; |
| 1159 | } break; |
| 1160 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 1161 | int type; |
| 1162 | 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); |
| 1163 | |
| 1164 | if (type == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`! || type == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 1165 | msafe_structcxx . . $ msafe_struct# mstruct; |
| 1166 | |
| 1167 | mstruct.objhandlecxx . . $ msafe_struct#objhandle. = data->evt_collidecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_collide..it_handlecxx . . $ tOSIRISEVTCOLLIDE#it_handle.; |
| 1168 | mstruct.killer_handlecxx . . $ msafe_struct#killer_handle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1169 | mstruct.damage_typecxx . . $ msafe_struct#damage_type. = PD_ENERGY_WEAPONcxx . . $ `Descent3/damage_external.h:24:9`!; |
| 1170 | mstruct.amountcxx . . $ msafe_struct#amount. = 50.0f * Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1171 | |
| 1172 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_DAMAGE_OBJECTcxx . . $ `scripts/osiris_common.h:811:9`!, &mstruct); |
| 1173 | } |
| 1174 | } break; |
| 1175 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 1176 | if (data->evt_ai_notifycxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_ai_notify..notify_typecxx . . $ tOSIRISEVTAINOTIFY#notify_type. == AIN_FIRED_WEAPONcxx . . $ `Descent3/aistruct_external.h:314:9`!) { |
| 1177 | memorycxx . . $ Gun#memory.->f_firecxx . . $ gun_data#f_fire. = !memorycxx . . $ Gun#memory.->f_firecxx . . $ gun_data#f_fire.; |
| 1178 | |
| 1179 | if (memorycxx . . $ Gun#memory.->f_firecxx . . $ gun_data#f_fire.) |
| 1180 | ; |
| 1181 | { |
| 1182 | int room; |
| 1183 | vectorcxx . . $ vector# pos; |
| 1184 | vectorcxx . . $ vector# dir; |
| 1185 | matrixcxx . . $ matrix# orient; |
| 1186 | vectorcxx . . $ vector# velocity; |
| 1187 | |
| 1188 | 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); |
| 1189 | |
| 1190 | Obj_GetGunPoscxx . . $ Obj_GetGunPos(acebd7a68d406969).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 5, &pos, &dir); |
| 1191 | dir *=cxx . . $ `operator*=`(f132838b2cd11d6). -1.0f; |
| 1192 | vm_VectorToMatrixcxx . . $ vm_VectorToMatrix(543233b88555916d).(&orient, &dir, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1193 | |
| 1194 | velocity =cxx . . $ vector#`operator=`(c0842353a20857d). dir *cxx . . $ `operator*`(252247219a31502c). qRandomValuecxx . . $ qRandomValue(d59a45cd3bfd2eda).(30.0f, 35.0f); |
| 1195 | |
| 1196 | Obj_Createcxx . . $ Obj_Create(fa124986c2825aef).(OBJ_BUILDINGcxx . . $ `Descent3/object_external.h:176:9`!, memorycxx . . $ Gun#memory.->shell_idcxx . . $ gun_data#shell_id., room, &pos, &orient, data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., &velocity); |
| 1197 | } |
| 1198 | } |
| 1199 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`!; |
| 1200 | break; |
| 1201 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 1202 | } break; |
| 1203 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 1204 | memorycxx . . $ Gun#memory. = (gun_datacxx . . $ gun_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 1205 | } break; |
| 1206 | } |
| 1207 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1208 | } |
| 1209 | |
| 1210 | //------------------ |
| 1211 | // Casing class |
| 1212 | //------------------ |
| 1213 | |
| 1214 | int16_t Casingcxx . . $ Casing#::CallEventcxx . . $ Casing#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1215 | switch (event) { |
| 1216 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 1217 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 1218 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 1219 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(casing_datacxx . . $ casing_data#); |
| 1220 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 1221 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1222 | |
| 1223 | memorycxx . . $ Casing#memory. = (casing_datacxx . . $ casing_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 1224 | memorycxx . . $ Casing#memory.->time_leftcxx . . $ casing_data#time_left. = qRandomValuecxx . . $ qRandomValue(d59a45cd3bfd2eda).(5.0f, 10.0f); |
| 1225 | } break; |
| 1226 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: |
| 1227 | memorycxx . . $ Casing#memory.->time_leftcxx . . $ casing_data#time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1228 | if (memorycxx . . $ Casing#memory.->time_leftcxx . . $ casing_data#time_left. < 0.0f) { |
| 1229 | msafe_structcxx . . $ msafe_struct# mo; |
| 1230 | mo.objhandlecxx . . $ msafe_struct#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1231 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 1232 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 1233 | } |
| 1234 | break; |
| 1235 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 1236 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`!; |
| 1237 | break; |
| 1238 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 1239 | } break; |
| 1240 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 1241 | memorycxx . . $ Casing#memory. = (casing_datacxx . . $ casing_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 1242 | } break; |
| 1243 | } |
| 1244 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1245 | } |
| 1246 | |
| 1247 | //------------------ |
| 1248 | // CombWallHit class |
| 1249 | //------------------ |
| 1250 | |
| 1251 | int16_t CombWallHitcxx . . $ CombWallHit#::CallEventcxx . . $ CombWallHit#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1252 | switch (event) { |
| 1253 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 1254 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 1255 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 1256 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(combwallhit_datacxx . . $ combwallhit_data#); |
| 1257 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 1258 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1259 | |
| 1260 | memorycxx . . $ CombWallHit#memory. = (combwallhit_datacxx . . $ combwallhit_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 1261 | memorycxx . . $ CombWallHit#memory.->time_leftcxx . . $ combwallhit_data#time_left. = Game_GetFrameTimecxx . . $ Game_GetFrameTime.() * 1.05f; |
| 1262 | // mprintf(0, "HERE\n"); |
| 1263 | } break; |
| 1264 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: |
| 1265 | memorycxx . . $ CombWallHit#memory.->time_leftcxx . . $ combwallhit_data#time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1266 | if (memorycxx . . $ CombWallHit#memory.->time_leftcxx . . $ combwallhit_data#time_left. < 0.0f) { |
| 1267 | msafe_structcxx . . $ msafe_struct# mo; |
| 1268 | mo.objhandlecxx . . $ msafe_struct#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1269 | mo.playsoundcxx . . $ msafe_struct#playsound. = 0; |
| 1270 | MSafe_CallFunctioncxx . . $ MSafe_CallFunction.(MSAFE_OBJECT_REMOVEcxx . . $ `scripts/osiris_common.h:819:9`!, &mo); |
| 1271 | } |
| 1272 | break; |
| 1273 | case EVT_AI_NOTIFYcxx . . $ `scripts/osiris_common.h:371:9`!: |
| 1274 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`!; |
| 1275 | break; |
| 1276 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 1277 | } break; |
| 1278 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 1279 | memorycxx . . $ CombWallHit#memory. = (combwallhit_datacxx . . $ combwallhit_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 1280 | } break; |
| 1281 | } |
| 1282 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1283 | } |
| 1284 | |
| 1285 | //------------------ |
| 1286 | // DropTarget class |
| 1287 | //------------------ |
| 1288 | |
| 1289 | int16_t DropTargetcxx . . $ DropTarget#::CallEventcxx . . $ DropTarget#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1290 | switch (event) { |
| 1291 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: { |
| 1292 | tOSIRISMEMCHUNKcxx . . $ tOSIRISMEMCHUNK# ch; |
| 1293 | ch.idcxx . . $ tOSIRISMEMCHUNK#id. = 4; |
| 1294 | ch.sizecxx . . $ tOSIRISMEMCHUNK#size. = sizeof(droptarget_datacxx . . $ droptarget_data#); |
| 1295 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..typecxx . . $ tOSIRISSCRIPTID#type. = OBJECT_SCRIPTcxx . . $ OBJECT_SCRIPT.; |
| 1296 | ch.my_idcxx . . $ tOSIRISMEMCHUNK#my_id..objhandlecxx . . $ tOSIRISSCRIPTID#$anonymous_type_3#objhandle. = data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.; |
| 1297 | |
| 1298 | memorycxx . . $ DropTarget#memory. = (droptarget_datacxx . . $ droptarget_data# *)Scrpt_MemAlloccxx . . $ Scrpt_MemAlloc.(&ch); |
| 1299 | memorycxx . . $ DropTarget#memory.->time_leftcxx . . $ droptarget_data#time_left. = 5.0f; |
| 1300 | memorycxx . . $ DropTarget#memory.->last_set_timecxx . . $ droptarget_data#last_set_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 1301 | // mprintf(0, "HERE\n"); |
| 1302 | } break; |
| 1303 | case EVT_INTERVALcxx . . $ `scripts/osiris_common.h:363:9`!: { |
| 1304 | float frame; |
| 1305 | 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); |
| 1306 | |
| 1307 | if (frame == 5.0f) { |
| 1308 | memorycxx . . $ DropTarget#memory.->time_leftcxx . . $ droptarget_data#time_left. -= Game_GetFrameTimecxx . . $ Game_GetFrameTime.(); |
| 1309 | if (memorycxx . . $ DropTarget#memory.->time_leftcxx . . $ droptarget_data#time_left. < 0.0f) { |
| 1310 | memorycxx . . $ DropTarget#memory.->time_leftcxx . . $ droptarget_data#time_left. = 5.0f; |
| 1311 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 5.0f, 10.0f, 0.5f, 0, Sound_FindIdcxx . . $ Sound_FindId.("DorPTMCCovertDOpenB"), -1); |
| 1312 | } |
| 1313 | } |
| 1314 | } break; |
| 1315 | case EVT_COLLIDEcxx . . $ `scripts/osiris_common.h:366:9`!: { |
| 1316 | float frame; |
| 1317 | char type; |
| 1318 | |
| 1319 | 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); |
| 1320 | AI_Valuecxx . . $ AI_Value.(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., VF_GETcxx . . $ `scripts/osiris_common.h:450:9`!, AIV_C_NEXT_ANIMATION_TYPEcxx . . $ `scripts/osiris_common.h:521:9`!, &type); |
| 1321 | |
| 1322 | if ((frame == 0.0f || frame == 10.0f) && type != AS_CUSTOMcxx . . $ `Descent3/aistruct_external.h:445:9`! && memorycxx . . $ DropTarget#memory.->last_set_timecxx . . $ droptarget_data#last_set_time. + 5.0f < Game_GetTimecxx . . $ Game_GetTime.()) { |
| 1323 | memorycxx . . $ DropTarget#memory.->last_set_timecxx . . $ droptarget_data#last_set_time. = Game_GetTimecxx . . $ Game_GetTime.(); |
| 1324 | Obj_SetCustomAnimcxx . . $ Obj_SetCustomAnim(d2ce4cea4bbae452).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle., 0.0f, 5.0f, 0.5f, 0, Sound_FindIdcxx . . $ Sound_FindId.("DorPTMCCovertDOpenB"), -1); |
| 1325 | } |
| 1326 | } break; |
| 1327 | case EVT_DESTROYcxx . . $ `scripts/osiris_common.h:368:9`!: { |
| 1328 | } break; |
| 1329 | case EVT_MEMRESTOREcxx . . $ `scripts/osiris_common.h:378:9`!: { |
| 1330 | memorycxx . . $ DropTarget#memory. = (droptarget_datacxx . . $ droptarget_data# *)data->evt_memrestorecxx . . $ tOSIRISEventInfo#$anonymous_type_1#evt_memrestore..memory_ptrcxx . . $ tOSIRISEVTMEMRESTORE#memory_ptr.; |
| 1331 | } break; |
| 1332 | } |
| 1333 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1334 | } |
| 1335 | |
| 1336 | //------------------ |
| 1337 | // Hanging Light |
| 1338 | //------------------ |
| 1339 | |
| 1340 | void HangLightcxx . . $ HangLight#::DoInitcxx . . $ HangLight#DoInit(d4f767463ce0a6b3).(int me) { CreateAndAttachcxx . . $ CreateAndAttach(89febe1abf2bb0cc).(me, "MERC3_danglinglightbulb", OBJ_CLUTTERcxx . . $ `Descent3/object_external.h:171:9`!, 0, 0, true, true); } |
| 1341 | |
| 1342 | int16_t HangLightcxx . . $ HangLight#::CallEventcxx . . $ HangLight#CallEvent(585a6502c7945bab).(int event, tOSIRISEventInfocxx . . $ tOSIRISEventInfo# *data) { |
| 1343 | switch (event) { |
| 1344 | case EVT_CREATEDcxx . . $ `scripts/osiris_common.h:367:9`!: |
| 1345 | DoInitcxx . . $ HangLight#DoInit(d4f767463ce0a6b3).(data->me_handlecxx . . $ tOSIRISEventInfo#me_handle.); |
| 1346 | break; |
| 1347 | } |
| 1348 | return CONTINUE_CHAINcxx . . $ `scripts/osiris_common.h:357:9`! | CONTINUE_DEFAULTcxx . . $ `scripts/osiris_common.h:358:9`!; |
| 1349 | } |