Discover more chrflags

This commit is contained in:
Ryan Dwyer 2023-01-16 19:10:31 +10:00
parent 47f8b83062
commit c78ff83fc8
30 changed files with 179 additions and 173 deletions

View File

@ -857,13 +857,13 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
chr->ground = ground; chr->ground = ground;
if (chr->chrflags & CHRCFLAG_00000001) { if (chr->chrflags & CHRCFLAG_FORCETOGROUND) {
node = model->definition->rootnode; node = model->definition->rootnode;
nodetype = (u8)node->type; nodetype = (u8)node->type;
arg2->y += yincrement + chr->ground - manground; arg2->y += yincrement + chr->ground - manground;
chr->chrflags &= ~CHRCFLAG_00000001; chr->chrflags &= ~CHRCFLAG_FORCETOGROUND;
chr->manground = chr->ground; chr->manground = chr->ground;
chr->sumground = chr->ground * (PAL ? 8.4175090789795f : 9.999998f); chr->sumground = chr->ground * (PAL ? 8.4175090789795f : 9.999998f);
@ -1121,7 +1121,7 @@ void chrInit(struct prop *prop, u8 *ailist)
chr->floorroom = -1; chr->floorroom = -1;
chr->fadealpha = 0xff; chr->fadealpha = 0xff;
chr->chrflags = CHRCFLAG_00000001; chr->chrflags = CHRCFLAG_FORCETOGROUND;
chr->hidden = 0; chr->hidden = 0;
chr->hidden2 = 0; chr->hidden2 = 0;
chr->actiontype = ACT_INIT; chr->actiontype = ACT_INIT;
@ -1924,8 +1924,8 @@ void chr0f0220ec(struct chrdata *chr, s32 lvupdate240, bool arg2)
} }
} }
if (chr->chrflags & CHRCFLAG_20000000) { if (chr->chrflags & CHRCFLAG_DELAYANIM) {
chr->chrflags &= ~CHRCFLAG_20000000; chr->chrflags &= ~CHRCFLAG_DELAYANIM;
} else if (arg2) { } else if (arg2) {
if ((chr->hidden & CHRHFLAG_00000800) == 0) { if ((chr->hidden & CHRHFLAG_00000800) == 0) {
modelGetRootPosition(model, &chr->prevpos); modelGetRootPosition(model, &chr->prevpos);
@ -2413,7 +2413,7 @@ s32 chrTick(struct prop *prop)
chrUpdateCloak(chr); chrUpdateCloak(chr);
chrTickPoisoned(chr); chrTickPoisoned(chr);
if ((chr->chrflags & CHRCFLAG_HIDDEN) == 0 || (chr->chrflags & CHRCFLAG_00040000)) { if ((chr->chrflags & CHRCFLAG_HIDDEN) == 0 || (chr->chrflags & CHRCFLAG_NEVERSLEEP)) {
if (var8006296c) { if (var8006296c) {
if (animHasFrames(g_SelectedAnimNum)) { if (animHasFrames(g_SelectedAnimNum)) {
if (modelGetAnimNum(model) != g_SelectedAnimNum || !animHasFrames(modelGetAnimNum(model))) { if (modelGetAnimNum(model) != g_SelectedAnimNum || !animHasFrames(modelGetAnimNum(model))) {
@ -2539,7 +2539,7 @@ s32 chrTick(struct prop *prop)
} else if (chr->actiontype == ACT_STAND) { } else if (chr->actiontype == ACT_STAND) {
model->anim->average = false; model->anim->average = false;
if (chr->chrflags & CHRCFLAG_00000001) { if (chr->chrflags & CHRCFLAG_FORCETOGROUND) {
chr0f0220ec(chr, lvupdate240, true); chr0f0220ec(chr, lvupdate240, true);
needsupdate = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true); needsupdate = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
} else { } else {
@ -5198,12 +5198,12 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
} }
if (g_Vars.coopplayernum >= 0 if (g_Vars.coopplayernum >= 0
&& g_Vars.coopfriendlyfire == 0 && g_Vars.coopfriendlyfire == false
&& prop->type == PROPTYPE_PLAYER) { && prop->type == PROPTYPE_PLAYER) {
return; return;
} }
if (g_MissionConfig.iscoop && g_Vars.coopfriendlyfire == 0 && chr->team == TEAM_ALLY) { if (g_MissionConfig.iscoop && g_Vars.coopfriendlyfire == false && chr->team == TEAM_ALLY) {
return; return;
} }

View File

@ -5713,7 +5713,7 @@ void chrNavTickMagic(struct chrdata *chr, struct waydata *waydata, f32 speed, st
rwdata = modelGetNodeRwData(chr->model, chr->model->definition->rootnode); rwdata = modelGetNodeRwData(chr->model, chr->model->definition->rootnode);
rwdata->chrinfo.ground = ground; rwdata->chrinfo.ground = ground;
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
if (chr->actiontype == ACT_PATROL) { if (chr->actiontype == ACT_PATROL) {
func0f0375b0(chr); func0f0375b0(chr);
@ -6709,23 +6709,29 @@ bool chrIsReadyForOrders(struct chrdata *chr)
} }
switch ((s32) chr->actiontype) { switch ((s32) chr->actiontype) {
#if VERSION >= VERSION_NTSC_1_0
case ACT_DIE: case ACT_DIE:
case ACT_DEAD: case ACT_DEAD:
case ACT_PREARGH: case ACT_PREARGH:
case ACT_DRUGGEDDROP: case ACT_DRUGGEDDROP:
case ACT_DRUGGEDKO: case ACT_DRUGGEDKO:
case ACT_DRUGGEDCOMINGUP: case ACT_DRUGGEDCOMINGUP:
#if VERSION < VERSION_NTSC_1_0
case ACT_ARGH:
case 0x200:
#endif
return false; return false;
#if VERSION >= VERSION_NTSC_1_0
case ACT_ARGH: case ACT_ARGH:
if ((chr->chrflags & CHRCFLAG_00000200) == 0) { if ((chr->chrflags & CHRCFLAG_CANCHANGEACTDURINGARGH) == 0) {
return false; return false;
} }
break; break;
#else
case ACT_DIE:
case ACT_DEAD:
case ACT_PREARGH:
case ACT_DRUGGEDDROP:
case ACT_DRUGGEDKO:
case ACT_DRUGGEDCOMINGUP:
case ACT_ARGH:
case 0x200:
return false;
#endif #endif
case ACT_ROBOTATTACK: case ACT_ROBOTATTACK:
if (!chr->act_robotattack.finished) { if (!chr->act_robotattack.finished) {
@ -7240,7 +7246,7 @@ bool chrGoToPos(struct chrdata *chr, struct coord *pos, u32 goposflags)
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
if (g_NumChrsSeenPlayerRecently2 < 9 if (g_NumChrsSeenPlayerRecently2 < 9
|| (chr->hidden & CHRHFLAG_BASICGUARD) == 0 || (chr->hidden & CHRHFLAG_BASICGUARD) == 0
|| (chr->flags & CHRCFLAG_00040000)) || (chr->flags & CHRCFLAG_NEVERSLEEP))
#else #else
if (g_NumChrsSeenPlayerRecently2 < 10) if (g_NumChrsSeenPlayerRecently2 < 10)
#endif #endif
@ -10328,7 +10334,7 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
// were aiming for // were aiming for
if (isaibot if (isaibot
|| fudgeforeyespy || fudgeforeyespy
|| ((chr->chrflags & CHRCFLAG_00000040) && chrCompareTeams(hitprop->chr, chr, COMPARE_ENEMIES))) { || ((chr->chrflags & CHRCFLAG_NOFRIENDLYFIRE) && chrCompareTeams(hitprop->chr, chr, COMPARE_ENEMIES))) {
struct modelnode *node = NULL; struct modelnode *node = NULL;
struct model *model = NULL; struct model *model = NULL;
s32 side = -1; s32 side = -1;
@ -13246,7 +13252,7 @@ void chraTick(struct chrdata *chr)
} }
if (chr->actiontype == ACT_INIT) { if (chr->actiontype == ACT_INIT) {
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
func0f02e9a0(chr, 0); func0f02e9a0(chr, 0);
chr->sleep = 0; chr->sleep = 0;
} }
@ -13271,7 +13277,7 @@ void chraTick(struct chrdata *chr)
chr->sleep -= g_Vars.lvupdate60; chr->sleep -= g_Vars.lvupdate60;
if (chr->sleep < 0 if (chr->sleep < 0
|| (chr->chrflags & CHRCFLAG_00040000) || (chr->chrflags & CHRCFLAG_NEVERSLEEP)
|| chr->alertness >= 65 || chr->alertness >= 65
|| (chr->aibot && (chr->actiontype == ACT_DIE || chr->actiontype == ACT_DEAD))) { || (chr->aibot && (chr->actiontype == ACT_DIE || chr->actiontype == ACT_DEAD))) {
u8 pass = race == RACE_HUMAN || race == RACE_SKEDAR; u8 pass = race == RACE_HUMAN || race == RACE_SKEDAR;
@ -15306,7 +15312,7 @@ bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 angle,
rwdata->chrinfo.ground = ground; rwdata->chrinfo.ground = ground;
} }
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
chrSetLookAngle(chr, angle); chrSetLookAngle(chr, angle);
if (chr->prop->type == PROPTYPE_PLAYER) { if (chr->prop->type == PROPTYPE_PLAYER) {
@ -16154,7 +16160,7 @@ void chrAvoid(struct chrdata *chr)
if ((random() % 255) >= 2) { if ((random() % 255) >= 2) {
cdresult = CDRESULT_COLLISION; cdresult = CDRESULT_COLLISION;
chr->chrflags &= ~CHRCFLAG_10000000; chr->chrflags &= ~CHRCFLAG_AVOIDING;
} }
} else if (relangle > 225 && relangle < 315) { } else if (relangle > 225 && relangle < 315) {
animindex = 3; animindex = 3;
@ -16189,11 +16195,11 @@ void chrAvoid(struct chrdata *chr)
} }
if (cdresult == CDRESULT_ERROR) { if (cdresult == CDRESULT_ERROR) {
chr->chrflags &= ~CHRCFLAG_10000000; chr->chrflags &= ~CHRCFLAG_AVOIDING;
} else if (cdresult == CDRESULT_NOCOLLISION) { } else if (cdresult == CDRESULT_NOCOLLISION) {
chrStartAnim(chr, anims[animindex], 0, anims[4 + animindex], chranimflags, 2, 0.6f); chrStartAnim(chr, anims[animindex], 0, anims[4 + animindex], chranimflags, 2, 0.6f);
} else { } else {
chr->chrflags &= ~CHRCFLAG_10000000; chr->chrflags &= ~CHRCFLAG_AVOIDING;
} }
} }
@ -16211,7 +16217,7 @@ void chrAvoid(struct chrdata *chr)
bool chrIsAvoiding(struct chrdata *chr) bool chrIsAvoiding(struct chrdata *chr)
{ {
s32 anim = modelGetAnimNum(chr->model); s32 anim = modelGetAnimNum(chr->model);
chr->chrflags &= ~CHRCFLAG_10000000; chr->chrflags &= ~CHRCFLAG_AVOIDING;
// Possible @bug or just sloppy code: The flag check below can never pass // Possible @bug or just sloppy code: The flag check below can never pass
// because that flag was just turned off above. // because that flag was just turned off above.
@ -16219,7 +16225,7 @@ bool chrIsAvoiding(struct chrdata *chr)
|| anim == ANIM_0065 || anim == ANIM_0065
|| anim == ANIM_0066 || anim == ANIM_0066
|| anim == ANIM_0067 || anim == ANIM_0067
|| (chr->chrflags & CHRCFLAG_10000000)) { || (chr->chrflags & CHRCFLAG_AVOIDING)) {
return true; return true;
} }

View File

@ -3266,7 +3266,7 @@ u8 func000c_combat_with_target_chr[] = {
// Co-op with friend or counter-op on any of the above stages // Co-op with friend or counter-op on any of the above stages
// Or follow through if chr still has target // Or follow through if chr still has target
label(0x16) label(0x16)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
dprint 'D','E','T','E','C','T','\n',0, dprint 'D','E','T','E','C','T','\n',0,
if_chr_dead(CHR_SELF, /*goto*/ 0x16) if_chr_dead(CHR_SELF, /*goto*/ 0x16)
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16)
@ -3534,7 +3534,7 @@ u8 func000c_combat_with_target_chr[] = {
label(0xb6) label(0xb6)
set_grenade_probability_out_of_255(255) set_grenade_probability_out_of_255(255)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) if_chr_dead(CHR_TARGET, /*goto*/ 0xc1)
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1)
if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1)
@ -4495,7 +4495,7 @@ u8 func000f_hand_combat[] = {
* The chr will make one comment, then it returns to the previous function. * The chr will make one comment, then it returns to the previous function.
*/ */
u8 func0010_civilian_say_comment[] = { u8 func0010_civilian_say_comment[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_shotlist(GAILIST_SURPRISED) set_shotlist(GAILIST_SURPRISED)
label(0x0c) label(0x0c)
@ -4772,7 +4772,7 @@ u8 func001b_observe_camspy[] = {
// Shoot camspy // Shoot camspy
label(0x09) label(0x09)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x16) try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x16)
label(0x16) label(0x16)
@ -5148,7 +5148,7 @@ u8 func001f_related_to_spawning[] = {
*/ */
u8 func0012_init_default_buddy[] = { u8 func0012_init_default_buddy[] = {
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PASSIVE) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PASSIVE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_team(CHR_SELF, TEAM_ALLY) set_chr_team(CHR_SELF, TEAM_ALLY)
set_self_chrflag(CHRCFLAG_PUSHABLE) set_self_chrflag(CHRCFLAG_PUSHABLE)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_DETECTED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_DETECTED)
@ -5226,7 +5226,7 @@ u8 func0012_init_default_buddy[] = {
u8 func0013_init_pugilist_buddy[] = { u8 func0013_init_pugilist_buddy[] = {
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PASSIVE) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PASSIVE)
set_chr_team(CHR_SELF, TEAM_ALLY) set_chr_team(CHR_SELF, TEAM_ALLY)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_PUSHABLE) set_self_chrflag(CHRCFLAG_PUSHABLE)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_DETECTED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_DETECTED)
set_alertness(200) set_alertness(200)
@ -5288,7 +5288,7 @@ u8 func0014_buddy_main[] = {
set_returnlist(CHR_SELF, GAILIST_BUDDY_MAIN) set_returnlist(CHR_SELF, GAILIST_BUDDY_MAIN)
set_shotlist(GAILIST_BUDDY_MAIN) set_shotlist(GAILIST_BUDDY_MAIN)
dprint 'B','A','C','K',' ','T','O',' ','B','U','D','D','Y','\n',0, dprint 'B','A','C','K',' ','T','O',' ','B','U','D','D','Y','\n',0,
unset_self_chrflag(CHRCFLAG_00040000) unset_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_flag_bankx(CHRFLAG1_AIVSAI_ADVANTAGED, BANK_1) set_self_flag_bankx(CHRFLAG1_AIVSAI_ADVANTAGED, BANK_1)
set_morale(0) set_morale(0)
set_shotlist(GAILIST_BUDDY_MAIN) set_shotlist(GAILIST_BUDDY_MAIN)
@ -5599,7 +5599,7 @@ u8 func0015_buddy_stealth[] = {
label(0x16) label(0x16)
remove_references_to_chr remove_references_to_chr
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag((CHRCFLAG_HIDDEN | CHRCFLAG_PERIMDISABLEDTMP | CHRCFLAG_00040000)) set_self_chrflag(CHRCFLAG_HIDDEN | CHRCFLAG_PERIMDISABLEDTMP | CHRCFLAG_NEVERSLEEP)
// Wait 3 seconds // Wait 3 seconds
restart_timer restart_timer
@ -5650,7 +5650,7 @@ u8 func0015_buddy_stealth[] = {
goto_first(0x19) goto_first(0x19)
label(0x17) label(0x17)
unset_self_chrflag(CHRCFLAG_HIDDEN | CHRCFLAG_PERIMDISABLEDTMP | CHRCFLAG_00040000) unset_self_chrflag(CHRCFLAG_HIDDEN | CHRCFLAG_PERIMDISABLEDTMP | CHRCFLAG_NEVERSLEEP)
unset_self_chrflag(CHRCFLAG_INVINCIBLE) unset_self_chrflag(CHRCFLAG_INVINCIBLE)
unset_chr_hiddenflag(CHR_SELF, CHRHFLAG_SPAWNONLYSURROUNDING | CHRHFLAG_WARPONSCREEN) unset_chr_hiddenflag(CHR_SELF, CHRHFLAG_SPAWNONLYSURROUNDING | CHRHFLAG_WARPONSCREEN)
set_chr_cloaked(CHR_SELF, FALSE, TRUE) set_chr_cloaked(CHR_SELF, FALSE, TRUE)
@ -5748,7 +5748,7 @@ u8 func0026_init_psychosis[] = {
set_shotlist(GAILIST_INIT_PSYCHOSIS) set_shotlist(GAILIST_INIT_PSYCHOSIS)
set_chr_team(CHR_SELF, TEAM_NONCOMBAT) set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
set_self_flag_bankx(CHRFLAG1_PUNCHHARDER, BANK_1) set_self_flag_bankx(CHRFLAG1_PUNCHHARDER, BANK_1)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_PUSHABLE) set_self_chrflag(CHRCFLAG_PUSHABLE)
set_self_flag_bankx(CHRFLAG1_AIVSAI_ADVANTAGED, BANK_1) set_self_flag_bankx(CHRFLAG1_AIVSAI_ADVANTAGED, BANK_1)
set_self_flag_bankx(CHRFLAG1_IGNORECOVER, BANK_1) set_self_flag_bankx(CHRFLAG1_IGNORECOVER, BANK_1)
@ -5914,7 +5914,7 @@ u8 func002d_invincible_and_idle[] = {
*/ */
u8 func0020_buddy_warp[] = { u8 func0020_buddy_warp[] = {
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED)
stop_chr stop_chr
set_target_chr(CHR_BOND) set_target_chr(CHR_BOND)

View File

@ -117,9 +117,9 @@ void gamefileApplyOptions(struct gamefile *file)
} }
g_Vars.pendingantiplayernum = pakHasBitflag(GAMEFILEFLAG_ANTIPLAYERNUM, file->flags) ? 1 : 0; g_Vars.pendingantiplayernum = pakHasBitflag(GAMEFILEFLAG_ANTIPLAYERNUM, file->flags) ? 1 : 0;
g_Vars.coopradaron = pakHasBitflag(GAMEFILEFLAG_COOPRADARON, file->flags) ? 1 : 0; g_Vars.coopradaron = pakHasBitflag(GAMEFILEFLAG_COOPRADARON, file->flags) ? true : false;
g_Vars.coopfriendlyfire = pakHasBitflag(GAMEFILEFLAG_COOPFRIENDLYFIRE, file->flags) ? 1 : 0; g_Vars.coopfriendlyfire = pakHasBitflag(GAMEFILEFLAG_COOPFRIENDLYFIRE, file->flags) ? true : false;
g_Vars.antiradaron = pakHasBitflag(GAMEFILEFLAG_ANTIRADARON, file->flags) ? 1 : 0; g_Vars.antiradaron = pakHasBitflag(GAMEFILEFLAG_ANTIRADARON, file->flags) ? true : false;
#if VERSION >= VERSION_PAL_BETA #if VERSION >= VERSION_PAL_BETA
g_Vars.language = 0; g_Vars.language = 0;
@ -451,9 +451,9 @@ s32 gamefileSave(s32 device, s32 fileid, u16 deviceserial)
} }
pakSetBitflag(GAMEFILEFLAG_ANTIPLAYERNUM, g_GameFile.flags, g_Vars.pendingantiplayernum == 1); pakSetBitflag(GAMEFILEFLAG_ANTIPLAYERNUM, g_GameFile.flags, g_Vars.pendingantiplayernum == 1);
pakSetBitflag(GAMEFILEFLAG_COOPRADARON, g_GameFile.flags, g_Vars.coopradaron == 1); pakSetBitflag(GAMEFILEFLAG_COOPRADARON, g_GameFile.flags, g_Vars.coopradaron == true);
pakSetBitflag(GAMEFILEFLAG_COOPFRIENDLYFIRE, g_GameFile.flags, g_Vars.coopfriendlyfire == 1); pakSetBitflag(GAMEFILEFLAG_COOPFRIENDLYFIRE, g_GameFile.flags, g_Vars.coopfriendlyfire == true);
pakSetBitflag(GAMEFILEFLAG_ANTIRADARON, g_GameFile.flags, g_Vars.antiradaron == 1); pakSetBitflag(GAMEFILEFLAG_ANTIRADARON, g_GameFile.flags, g_Vars.antiradaron == true);
#if VERSION >= VERSION_PAL_BETA #if VERSION >= VERSION_PAL_BETA
pakSetBitflag(GAMEFILEFLAG_LANGBIT1, g_GameFile.flags, (g_Vars.language & 0x01) == 0x01); pakSetBitflag(GAMEFILEFLAG_LANGBIT1, g_GameFile.flags, (g_Vars.language & 0x01) == 0x01);

View File

@ -1324,7 +1324,7 @@ MenuItemHandlerResult menuhandlerCoopRadar(s32 operation, struct menuitem *item,
case MENUOP_GET: case MENUOP_GET:
return g_Vars.coopradaron; return g_Vars.coopradaron;
case MENUOP_SET: case MENUOP_SET:
g_Vars.coopradaron = data->checkbox.value ? 1 : 0; g_Vars.coopradaron = data->checkbox.value ? true : false;
g_Vars.modifiedfiles |= MODFILE_GAME; g_Vars.modifiedfiles |= MODFILE_GAME;
} }
@ -1337,7 +1337,7 @@ MenuItemHandlerResult menuhandlerCoopFriendlyFire(s32 operation, struct menuitem
case MENUOP_GET: case MENUOP_GET:
return g_Vars.coopfriendlyfire; return g_Vars.coopfriendlyfire;
case MENUOP_SET: case MENUOP_SET:
g_Vars.coopfriendlyfire = data->checkbox.value ? 1 : 0; g_Vars.coopfriendlyfire = data->checkbox.value ? true : false;
g_Vars.modifiedfiles |= MODFILE_GAME; g_Vars.modifiedfiles |= MODFILE_GAME;
} }

View File

@ -1465,7 +1465,7 @@ void playerTickChrBody(void)
g_MpAllChrConfigPtrs[g_Vars.currentplayernum] = &g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base; g_MpAllChrConfigPtrs[g_Vars.currentplayernum] = &g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].base;
} }
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
modelSetRootPosition(g_Vars.currentplayer->model00d4, &g_Vars.currentplayer->prop->pos); modelSetRootPosition(g_Vars.currentplayer->model00d4, &g_Vars.currentplayer->prop->pos);
chrSetLookAngle(g_Vars.currentplayer->prop->chr, turnangle); chrSetLookAngle(g_Vars.currentplayer->prop->chr, turnangle);
@ -1519,7 +1519,7 @@ void playerTickChrBody(void)
struct chrdata *chr = g_Vars.currentplayer->prop->chr; struct chrdata *chr = g_Vars.currentplayer->prop->chr;
if (chr->model->anim == NULL) { if (chr->model->anim == NULL) {
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
func0f02e9a0(chr, 0); func0f02e9a0(chr, 0);
modelSetRootPosition(g_Vars.currentplayer->model00d4, &g_Vars.currentplayer->prop->pos); modelSetRootPosition(g_Vars.currentplayer->model00d4, &g_Vars.currentplayer->prop->pos);
chrSetLookAngle(g_Vars.currentplayer->prop->chr, turnangle); chrSetLookAngle(g_Vars.currentplayer->prop->chr, turnangle);
@ -3726,7 +3726,7 @@ void playerTick(bool arg0)
chrSetMaxDamage(chr, 4); chrSetMaxDamage(chr, 4);
chr->chrflags |= CHRCFLAG_00040000; chr->chrflags |= CHRCFLAG_NEVERSLEEP;
chr->hidden |= CHRHFLAG_CLOAKED; chr->hidden |= CHRHFLAG_CLOAKED;
chr->cloakfadefinished = true; chr->cloakfadefinished = true;
chr->cloakfadefrac = 0; chr->cloakfadefrac = 0;
@ -3770,7 +3770,7 @@ void playerTick(bool arg0)
chrAddHealth(chr, 20); chrAddHealth(chr, 20);
} }
chr->chrflags |= CHRCFLAG_00040000; chr->chrflags |= CHRCFLAG_NEVERSLEEP;
chr->hidden |= CHRHFLAG_CLOAKED; chr->hidden |= CHRHFLAG_CLOAKED;
chr->cloakfadefinished = true; chr->cloakfadefinished = true;
chr->cloakfadefrac = 0; chr->cloakfadefrac = 0;
@ -3816,7 +3816,7 @@ void playerTick(bool arg0)
chrSetMaxDamage(chr, 10); chrSetMaxDamage(chr, 10);
chr->chrflags |= CHRCFLAG_00040000; chr->chrflags |= CHRCFLAG_NEVERSLEEP;
chr->hidden |= CHRHFLAG_CLOAKED; chr->hidden |= CHRHFLAG_CLOAKED;
chr->cloakfadefinished = true; chr->cloakfadefinished = true;
chr->cloakfadefrac = 0; chr->cloakfadefrac = 0;
@ -3862,7 +3862,7 @@ void playerTick(bool arg0)
chrSetMaxDamage(chr, 10); chrSetMaxDamage(chr, 10);
chr->chrflags |= CHRCFLAG_00040000; chr->chrflags |= CHRCFLAG_NEVERSLEEP;
chr->hidden |= CHRHFLAG_CLOAKED; chr->hidden |= CHRHFLAG_CLOAKED;
chr->cloakfadefinished = true; chr->cloakfadefinished = true;
chr->cloakfadefrac = 0; chr->cloakfadefrac = 0;
@ -3909,7 +3909,7 @@ void playerTick(bool arg0)
chrSetMaxDamage(chr, 10); chrSetMaxDamage(chr, 10);
chr->chrflags |= CHRCFLAG_00040000; chr->chrflags |= CHRCFLAG_NEVERSLEEP;
chr->hidden |= CHRHFLAG_CLOAKED; chr->hidden |= CHRHFLAG_CLOAKED;
chr->cloakfadefinished = true; chr->cloakfadefinished = true;
chr->cloakfadefrac = 0; chr->cloakfadefrac = 0;
@ -5280,7 +5280,7 @@ s32 playerTickThirdPerson(struct prop *prop)
if (var80075d60 == 0 if (var80075d60 == 0
|| var80075d60 == 1 || var80075d60 == 1
|| (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode != VISIONMODE_SLAYERROCKET)) { || (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode != VISIONMODE_SLAYERROCKET)) {
chr->chrflags |= CHRCFLAG_00000001; chr->chrflags |= CHRCFLAG_FORCETOGROUND;
player->bondperimenabled = false; player->bondperimenabled = false;
tickop1 = chrTick(prop); tickop1 = chrTick(prop);

View File

@ -1214,7 +1214,7 @@ void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2)
objDropRecursively(prop, false); objDropRecursively(prop, false);
} }
} else if (arg2) { } else if (arg2) {
chr->chrflags |= CHRCFLAG_10000000; chr->chrflags |= CHRCFLAG_AVOIDING;
} else { } else {
struct coord spb8; struct coord spb8;
struct coord vector; struct coord vector;

View File

@ -582,16 +582,16 @@
#define CHRH2FLAG_HEADSHOTTED 0x1000 #define CHRH2FLAG_HEADSHOTTED 0x1000
// chr->chrflags // chr->chrflags
#define CHRCFLAG_00000001 0x00000001 // Villa takers, Attack Ship Cass and skedar - both set at end of intros #define CHRCFLAG_FORCETOGROUND 0x00000001
#define CHRCFLAG_CLONEABLE 0x00000002 #define CHRCFLAG_CLONEABLE 0x00000002
#define CHRCFLAG_NEAR_MISS 0x00000004 #define CHRCFLAG_NEAR_MISS 0x00000004
#define CHRCFLAG_EVERONSCREEN 0x00000008 #define CHRCFLAG_EVERONSCREEN 0x00000008
#define CHRCFLAG_INVINCIBLE 0x00000010 #define CHRCFLAG_INVINCIBLE 0x00000010
#define CHRCFLAG_LOSEXTRAHEIGHT 0x00000020 // Chicago, Infiltration, AF1, Ruins, WAR #define CHRCFLAG_LOSEXTRAHEIGHT 0x00000020
#define CHRCFLAG_00000040 0x00000040 // Used quite a lot #define CHRCFLAG_NOFRIENDLYFIRE 0x00000040 // Chr can only hurt enemies
#define CHRCFLAG_CANFACEWALL 0x00000080 // Defection programmer, Rescue lab techs, globals when doing idle animation #define CHRCFLAG_CANFACEWALL 0x00000080 // Defection programmer, Rescue lab techs, globals when doing idle animation
#define CHRCFLAG_JUST_INJURED 0x00000100 #define CHRCFLAG_JUST_INJURED 0x00000100
#define CHRCFLAG_00000200 0x00000200 // Set on clones #define CHRCFLAG_CANCHANGEACTDURINGARGH 0x00000200
#define CHRCFLAG_HIDDEN 0x00000400 #define CHRCFLAG_HIDDEN 0x00000400
#define CHRCFLAG_NOAUTOAIM 0x00000800 #define CHRCFLAG_NOAUTOAIM 0x00000800
#define CHRCFLAG_UNEXPLODABLE 0x00001000 #define CHRCFLAG_UNEXPLODABLE 0x00001000
@ -600,19 +600,19 @@
#define CHRCFLAG_DIEWITHFORCE 0x00008000 // When killed with a weak weapon, fling the chr as if it was a strong weapon #define CHRCFLAG_DIEWITHFORCE 0x00008000 // When killed with a weak weapon, fling the chr as if it was a strong weapon
#define CHRCFLAG_PERIMDISABLEDTMP 0x00010000 // Collisions disabled temporarily #define CHRCFLAG_PERIMDISABLEDTMP 0x00010000 // Collisions disabled temporarily
#define CHRCFLAG_FORCEAUTOAIM 0x00020000 // Allow auto aim even if chr is unarmed #define CHRCFLAG_FORCEAUTOAIM 0x00020000 // Allow auto aim even if chr is unarmed
#define CHRCFLAG_00040000 0x00040000 // Used a lot #define CHRCFLAG_NEVERSLEEP 0x00040000
#define CHRCFLAG_RUNFASTER 0x00080000 #define CHRCFLAG_RUNFASTER 0x00080000
#define CHRCFLAG_KILLCOUNTABLE 0x00100000 #define CHRCFLAG_KILLCOUNTABLE 0x00100000
#define CHRCFLAG_TRIGGERSHOTLIST 0x00200000 #define CHRCFLAG_TRIGGERSHOTLIST 0x00200000
#define CHRCFLAG_00400000 0x00400000 // Not used in scripts #define CHRCFLAG_00400000 0x00400000 // Not used
#define CHRCFLAG_UNPLAYABLE 0x00800000 #define CHRCFLAG_UNPLAYABLE 0x00800000
#define CHRCFLAG_PUSHABLE 0x01000000 // Typically set on allies during init #define CHRCFLAG_PUSHABLE 0x01000000 // Typically set on allies during init
#define CHRCFLAG_SHIELDDAMAGED 0x02000000 #define CHRCFLAG_SHIELDDAMAGED 0x02000000
#define CHRCFLAG_KEEPCORPSEKO 0x04000000 #define CHRCFLAG_KEEPCORPSEKO 0x04000000
#define CHRCFLAG_CONSIDER_DODGE 0x08000000 #define CHRCFLAG_CONSIDER_DODGE 0x08000000
#define CHRCFLAG_10000000 0x10000000 // Not used in scripts #define CHRCFLAG_AVOIDING 0x10000000
#define CHRCFLAG_20000000 0x20000000 // Not used in scripts #define CHRCFLAG_DELAYANIM 0x20000000 // Never set, but would cause a chr to pause their animation for one frame
#define CHRCFLAG_40000000 0x40000000 // Not used in scripts #define CHRCFLAG_40000000 0x40000000 // Not used
#define CHRCFLAG_INJUREDTARGET 0x80000000 #define CHRCFLAG_INJUREDTARGET 0x80000000
#define CIQUIP_GREETING 0 #define CIQUIP_GREETING 0

View File

@ -38,9 +38,9 @@ void varsInit(void)
g_Vars.bond = NULL; g_Vars.bond = NULL;
g_Vars.coop = NULL; g_Vars.coop = NULL;
g_Vars.anti = NULL; g_Vars.anti = NULL;
g_Vars.coopradaron = 1; g_Vars.coopradaron = true;
g_Vars.coopfriendlyfire = 1; g_Vars.coopfriendlyfire = true;
g_Vars.antiradaron = 1; g_Vars.antiradaron = true;
g_Vars.pendingantiplayernum = 1; g_Vars.pendingantiplayernum = 1;
g_Vars.modifiedfiles = 0; g_Vars.modifiedfiles = 0;
g_Vars.numaibuddies = 0; g_Vars.numaibuddies = 0;

View File

@ -1065,7 +1065,7 @@ u8 unregistered_function[] = {
*/ */
u8 func0402_guard_with_chrflag[] = { u8 func0402_guard_with_chrflag[] = {
set_returnlist(CHR_SELF, 0x0402) set_returnlist(CHR_SELF, 0x0402)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
set_ailist(CHR_SELF, GAILIST_UNALERTED_0001) set_ailist(CHR_SELF, GAILIST_UNALERTED_0001)
endlist endlist
}; };
@ -1075,7 +1075,7 @@ u8 func0402_guard_with_chrflag[] = {
*/ */
u8 func0403_shielded_guard[] = { u8 func0403_shielded_guard[] = {
set_shield(200) set_shield(200)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
set_ailist(CHR_SELF, GAILIST_CHOOSE_TARGET) set_ailist(CHR_SELF, GAILIST_CHOOSE_TARGET)
endlist endlist
}; };
@ -1994,7 +1994,7 @@ u8 func0413_c318[] = {
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(255) set_alertness(255)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_UNALERTED_0001) set_ailist(CHR_SELF, GAILIST_UNALERTED_0001)

View File

@ -583,7 +583,7 @@ u8 func0402_start_drcaroll[] = {
u8 func0401_drcaroll_following[] = { u8 func0401_drcaroll_following[] = {
set_shotlist(AILIST_DRCAROLL_FOLLOWING) set_shotlist(AILIST_DRCAROLL_FOLLOWING)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
stop_chr stop_chr
set_target_chr(CHR_BOND) set_target_chr(CHR_BOND)
try_jog_to_target(/*goto*/ 0x00) try_jog_to_target(/*goto*/ 0x00)
@ -916,7 +916,7 @@ u8 func0411_top_guard_blinded[] = {
}; };
u8 func0406_general_combat[] = { u8 func0406_general_combat[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shotlist(AILIST_GENERAL_COMBAT) set_shotlist(AILIST_GENERAL_COMBAT)
if_has_gun(CHR_SELF, /*goto*/ 0x20) if_has_gun(CHR_SELF, /*goto*/ 0x20)
@ -968,7 +968,7 @@ u8 func0406_general_combat[] = {
// Not injured, or injury recovery finished // Not injured, or injury recovery finished
label(0x21) label(0x21)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
label(0x14) label(0x14)
if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x00) if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x00)

View File

@ -1341,7 +1341,7 @@ u8 func0417_init_robot[] = {
u8 func0418_robot[] = { u8 func0418_robot[] = {
set_shotlist(AILIST_ROBOT) set_shotlist(AILIST_ROBOT)
label(0x66) label(0x66)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
if_chr_dead(CHR_SELF, /*goto*/ 0x11) if_chr_dead(CHR_SELF, /*goto*/ 0x11)
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x11) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x11)
if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) if_chr_knockedout(CHR_SELF, /*goto*/ 0x08)
@ -1791,7 +1791,7 @@ u8 func100e_check_robots_left[] = {
u8 func041e_trent_waiting[] = { u8 func041e_trent_waiting[] = {
set_accuracy(0) set_accuracy(0)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shield(100) set_shield(100)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_INFINITESHIELD) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_INFINITESHIELD)

View File

@ -1346,7 +1346,7 @@ u8 func0407_stewardess[] = {
}; };
u8 func0406_become_unalerted[] = { u8 func0406_become_unalerted[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
label(0x00) label(0x00)
yield yield
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x02) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x02)
@ -2049,7 +2049,7 @@ u8 func040d_init_office1[] = {
u8 func0409_office1[] = { u8 func0409_office1[] = {
#define LABEL_RUN_TO_FOYER 0x4f #define LABEL_RUN_TO_FOYER 0x4f
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_morale(0) set_morale(0)
set_shotlist(AILIST_OFFICE1) set_shotlist(AILIST_OFFICE1)
if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_dead(CHR_SELF, /*goto*/ 0x02)
@ -2186,7 +2186,7 @@ u8 func040e_init_office2[] = {
}; };
u8 func040a_office2[] = { u8 func040a_office2[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_morale(0) set_morale(0)
set_shotlist(AILIST_OFFICE2) set_shotlist(AILIST_OFFICE2)
if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_dead(CHR_SELF, /*goto*/ 0x02)
@ -2411,8 +2411,8 @@ u8 func0410_unused[] = {
add_health_or_armor(0) add_health_or_armor(0)
set_recovery_speed(0) set_recovery_speed(0)
set_shield(0) set_shield(0)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_chrflag(CHR_SELF, CHRCFLAG_00040000) set_chr_chrflag(CHR_SELF, CHRCFLAG_NEVERSLEEP)
set_ailist(CHR_SELF, AILIST_NSA) set_ailist(CHR_SELF, AILIST_NSA)
endlist endlist
}; };
@ -2592,7 +2592,7 @@ u8 func040f_nsa[] = {
u8 func0412_init_takeover_lackey[] = { u8 func0412_init_takeover_lackey[] = {
set_shotlist(GAILIST_ALERTED) set_shotlist(GAILIST_ALERTED)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_dodge_rating(2, 10) set_chr_dodge_rating(2, 10)
set_accuracy(60) set_accuracy(60)
set_reaction_speed(80) set_reaction_speed(80)
@ -3061,7 +3061,7 @@ u8 func0426_init_alaskan_guard[] = {
* Assigned to stripes guards and NSA lackeys during takeover. * Assigned to stripes guards and NSA lackeys during takeover.
*/ */
u8 func0427_init_posttakeover_guard[] = { u8 func0427_init_posttakeover_guard[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_chr_team(CHR_SELF, TEAM_04) set_chr_team(CHR_SELF, TEAM_04)
set_chr_dodge_rating(2, 10) set_chr_dodge_rating(2, 10)
@ -3096,7 +3096,7 @@ u8 func0428_posttakeover_guard[] = {
label(0x02) label(0x02)
unset_self_chrflag(CHRCFLAG_HIDDEN) unset_self_chrflag(CHRCFLAG_HIDDEN)
unset_self_chrflag(CHRCFLAG_00040000) unset_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_ailist(CHR_SELF, AILIST_BECOME_UNALERTED) set_ailist(CHR_SELF, AILIST_BECOME_UNALERTED)
label(0x31) label(0x31)
@ -3140,7 +3140,7 @@ u8 func042a_foyer_spawner[] = {
set_shield(0) set_shield(0)
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x00) beginloop(0x00)
chr_toggle_p1p2(CHR_SELF) chr_toggle_p1p2(CHR_SELF)
@ -4028,7 +4028,7 @@ u8 func1026_check_alarm_destroyed[] = {
}; };
u8 func0417_remove_or_unalert[] = { u8 func0417_remove_or_unalert[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
label(0x00) label(0x00)
yield yield
@ -4054,7 +4054,7 @@ u8 func0417_remove_or_unalert[] = {
}; };
u8 func0418_remove_or_cower[] = { u8 func0418_remove_or_cower[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
label(0x00) label(0x00)
yield yield
set_target_chr(CHR_BOND) set_target_chr(CHR_BOND)

View File

@ -2136,7 +2136,7 @@ u8 func0404_angry_pilot[] = {
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
unset_self_flag_bankx(CHRFLAG0_ALERT_ON_HEARSPAWN, BANK_0) unset_self_flag_bankx(CHRFLAG0_ALERT_ON_HEARSPAWN, BANK_0)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shotlist(AILIST_ANGRY_PILOT) set_shotlist(AILIST_ANGRY_PILOT)
if_chr_dead(CHR_SELF, /*goto*/ 0x07) if_chr_dead(CHR_SELF, /*goto*/ 0x07)
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07)

View File

@ -1093,7 +1093,7 @@ u8 func1009_spawner_during_decode[] = {
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) \ set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) \
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) \ set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) \
set_alertness(90) \ set_alertness(90) \
set_self_chrflag(CHRCFLAG_00000200) \ set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH) \
rebuild_teams \ rebuild_teams \
rebuild_squadrons \ rebuild_squadrons \
run_to_pad(PAD_DEPO_004E) run_to_pad(PAD_DEPO_004E)
@ -2375,7 +2375,7 @@ u8 func0413_cloak1_guard[] = {
label(0x06) label(0x06)
unset_self_chrflag(CHRCFLAG_INVINCIBLE) unset_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_cloaked(CHR_SELF, TRUE, TRUE) set_chr_cloaked(CHR_SELF, TRUE, TRUE)
set_ailist(CHR_SELF, AILIST_CLOAK_GUARD) set_ailist(CHR_SELF, AILIST_CLOAK_GUARD)
endlist endlist
@ -2393,7 +2393,7 @@ u8 func0414_init_cloak2_guard[] = {
set_recovery_speed(0) set_recovery_speed(0)
set_shield(0) set_shield(0)
unset_self_chrflag(CHRCFLAG_INVINCIBLE) unset_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_cloaked(CHR_SELF, TRUE, TRUE) set_chr_cloaked(CHR_SELF, TRUE, TRUE)
set_ailist(CHR_SELF, AILIST_CLOAK_GUARD) set_ailist(CHR_SELF, AILIST_CLOAK_GUARD)
endlist endlist

View File

@ -2979,7 +2979,7 @@ u8 func1019_setup_carrington[] = {
u8 func042c_carrington_tour[] = { u8 func042c_carrington_tour[] = {
set_returnlist(CHR_SELF, AILIST_CARRINGTON_TOUR) set_returnlist(CHR_SELF, AILIST_CARRINGTON_TOUR)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
restart_timer restart_timer
try_face_entity(ATTACKFLAG_AIMATPAD, 0x0054, /*goto*/ 0x04) try_face_entity(ATTACKFLAG_AIMATPAD, 0x0054, /*goto*/ 0x04)
@ -3304,7 +3304,7 @@ u8 func042c_carrington_tour[] = {
u8 func042d_unused[] = { u8 func042d_unused[] = {
set_alertness(1) set_alertness(1)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
restart_timer restart_timer
try_face_entity(ATTACKFLAG_AIMATCHR, CHR_CARRINGTON, /*goto*/ 0x5f) try_face_entity(ATTACKFLAG_AIMATCHR, CHR_CARRINGTON, /*goto*/ 0x5f)
@ -3333,7 +3333,7 @@ u8 func042d_unused[] = {
u8 func042e_devicegirl_reply_to_carrington[] = { u8 func042e_devicegirl_reply_to_carrington[] = {
set_alertness(1) set_alertness(1)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
restart_timer restart_timer
try_face_entity(ATTACKFLAG_AIMATCHR, CHR_CARRINGTON, /*goto*/ 0x5f) try_face_entity(ATTACKFLAG_AIMATCHR, CHR_CARRINGTON, /*goto*/ 0x5f)
@ -4532,12 +4532,12 @@ u8 func1028_holo4_main[] = {
label(0x91) label(0x91)
if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x2f) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x2f)
remove_hudmsgs remove_hudmsgs
if_chr_has_chrflag(0x0d, CHRCFLAG_00000040, /*goto*/ 0x61) if_chr_has_chrflag(0x0d, CHRCFLAG_NOFRIENDLYFIRE, /*goto*/ 0x61)
show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_107) // "Unarmed combat - knock out the target. - Press Z Button repeatedly to punch." show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_107) // "Unarmed combat - knock out the target. - Press Z Button repeatedly to punch."
goto_next(0x2f) goto_next(0x2f)
label(0x61) label(0x61)
if_chr_has_chrflag(0x0e, CHRCFLAG_00000040, /*goto*/ 0x62) if_chr_has_chrflag(0x0e, CHRCFLAG_NOFRIENDLYFIRE, /*goto*/ 0x62)
remove_hudmsgs remove_hudmsgs
show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_108) // "Now try against a moving target..." show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_108) // "Now try against a moving target..."
goto_next(0x2f) goto_next(0x2f)
@ -4619,7 +4619,7 @@ u8 func0403_holo4_guard1[] = {
endloop(0x04) endloop(0x04)
label(0x2f) label(0x2f)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_0277, AILIST_HOLO4_GUARD2, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x08) try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_0277, AILIST_HOLO4_GUARD2, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x08)
label(0x08) label(0x08)
remove_hudmsgs remove_hudmsgs
@ -4640,7 +4640,7 @@ u8 func0404_holo4_guard2[] = {
goto_next(0x06) goto_next(0x06)
label(0x2f) label(0x2f)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_027A, AILIST_HOLO4_GUARD3, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x0a) try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_027A, AILIST_HOLO4_GUARD3, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x0a)
label(0x0a) label(0x0a)
remove_hudmsgs remove_hudmsgs
@ -4776,12 +4776,12 @@ u8 func1029_holo5_main[] = {
label(0x91) label(0x91)
if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x2f) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x2f)
remove_hudmsgs remove_hudmsgs
if_chr_has_chrflag(0x10, CHRCFLAG_00000040, /*goto*/ 0x61) if_chr_has_chrflag(0x10, CHRCFLAG_NOFRIENDLYFIRE, /*goto*/ 0x61)
show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_092) // "Disarm this live target if you can." show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_092) // "Disarm this live target if you can."
goto_next(0x2f) goto_next(0x2f)
label(0x61) label(0x61)
if_chr_has_chrflag(0x11, CHRCFLAG_00000040, /*goto*/ 0x62) if_chr_has_chrflag(0x11, CHRCFLAG_NOFRIENDLYFIRE, /*goto*/ 0x62)
show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_093) // "Knock out this target - stealth is the key." show_hudmsg_middle(0x01, COLOR_04_ORANGE, L_DISH_093) // "Knock out this target - stealth is the key."
goto_next(0x2f) goto_next(0x2f)
@ -4882,7 +4882,7 @@ u8 func0407_holo5_guard1[] = {
#else #else
set_alertness(100) set_alertness(100)
#endif #endif
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shotlist(GAILIST_IDLE) set_shotlist(GAILIST_IDLE)
goto_next(0x0a) goto_next(0x0a)
label(0x30) label(0x30)
@ -4900,7 +4900,7 @@ u8 func0407_holo5_guard1[] = {
set_ailist(CHR_SELF, GAILIST_IDLE) set_ailist(CHR_SELF, GAILIST_IDLE)
label(0x0a) label(0x0a)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
#else #else
@ -4989,7 +4989,7 @@ u8 func0409_holo5_guard2[] = {
label(0x2f) label(0x2f)
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
beginloop(0x57) beginloop(0x57)
try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_0125, AILIST_HOLO5_INIT_GUARD3, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x06) try_spawn_chr_at_pad(BODY_DDSHOCK, HEAD_RANDOM, PAD_DISH_0125, AILIST_HOLO5_INIT_GUARD3, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_BASICGUARD | SPAWNFLAG_NOBLOOD, /*goto*/ 0x06)

View File

@ -920,7 +920,7 @@ u8 func0414_walk_3_pads[] = {
* Unused. * Unused.
*/ */
u8 func0401_init_chr_with_flag[] = { u8 func0401_init_chr_with_flag[] = {
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
set_ailist(CHR_SELF, GAILIST_UNALERTED_0001) set_ailist(CHR_SELF, GAILIST_UNALERTED_0001)
endlist endlist
}; };
@ -2038,7 +2038,7 @@ u8 func0408_alarm_responder[] = {
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(90) set_alertness(90)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
// Run to scientist based on which alarm was triggered // Run to scientist based on which alarm was triggered
if_stage_flag_eq(STAGEFLAG_ALARM1_ACTIVE, TRUE, /*goto*/ 0x08) if_stage_flag_eq(STAGEFLAG_ALARM1_ACTIVE, TRUE, /*goto*/ 0x08)
@ -2715,7 +2715,7 @@ u8 func0409_uplink_responder[] = {
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(110) set_alertness(110)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
label(0x06) label(0x06)
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons

View File

@ -1206,11 +1206,11 @@ u8 func1002_intro[] = {
chr_do_animation(ANIM_CUT_ELD_INTRO_JO_02, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2) chr_do_animation(ANIM_CUT_ELD_INTRO_JO_02, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)
unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER1, CHRCFLAG_UNPLAYABLE)
set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000) set_chr_hiddenflag(CHR_TAKER1, CHRHFLAG_00020000)
set_chr_chrflag(CHR_TAKER1, CHRCFLAG_00000001) set_chr_chrflag(CHR_TAKER1, CHRCFLAG_FORCETOGROUND)
chr_do_animation(ANIM_CUT_ELD_INTRO_TAKER1_03, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_TAKER1, 2) chr_do_animation(ANIM_CUT_ELD_INTRO_TAKER1_03, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_TAKER1, 2)
unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_TAKER2, CHRCFLAG_UNPLAYABLE)
set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000) set_chr_hiddenflag(CHR_TAKER2, CHRHFLAG_00020000)
set_chr_chrflag(CHR_TAKER2, CHRCFLAG_00000001) set_chr_chrflag(CHR_TAKER2, CHRCFLAG_FORCETOGROUND)
chr_do_animation(ANIM_CUT_ELD_INTRO_TAKER2_03, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_TAKER2, 2) chr_do_animation(ANIM_CUT_ELD_INTRO_TAKER2_03, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_TAKER2, 2)
disable_object(OBJ_DROPSHIP) disable_object(OBJ_DROPSHIP)
stop_cutscene_track stop_cutscene_track
@ -1460,7 +1460,7 @@ u8 func0401_init_taker[] = {
}; };
u8 func0402_taker[] = { u8 func0402_taker[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
yield yield
yield yield
if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d) if_difficulty_lt(DIFF_PA, /*goto*/ 0x2d)

View File

@ -590,7 +590,7 @@ u8 func1400_setup_counterop[] = {
#define spawner_logic(initfunc, clonefunc) \ #define spawner_logic(initfunc, clonefunc) \
set_self_chrflag(CHRCFLAG_CLONEABLE) \ set_self_chrflag(CHRCFLAG_CLONEABLE) \
set_self_chrflag(CHRCFLAG_HIDDEN) \ set_self_chrflag(CHRCFLAG_HIDDEN) \
set_self_chrflag(CHRCFLAG_00040000) \ set_self_chrflag(CHRCFLAG_NEVERSLEEP) \
\ \
beginloop(0x0f) \ beginloop(0x0f) \
if_stage_flag_eq(STAGEFLAG_TRIGGER_SPAWNING, TRUE, /*goto*/ 0x04) \ if_stage_flag_eq(STAGEFLAG_TRIGGER_SPAWNING, TRUE, /*goto*/ 0x04) \
@ -1724,7 +1724,7 @@ u8 func041b_init_hostage_holo[] = {
u8 func041a_hostage_holo[] = { u8 func041a_hostage_holo[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_shotlist(AILIST_HOSTAGE_HOLO) set_shotlist(AILIST_HOSTAGE_HOLO)
if_chr_dead(CHR_SELF, /*goto*/ 0x2e) if_chr_dead(CHR_SELF, /*goto*/ 0x2e)
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e)
@ -1899,7 +1899,7 @@ u8 func041f_holoclone[] = {
endloop(0xba) \ endloop(0xba) \
\ \
label(0xbb) \ label(0xbb) \
set_self_chrflag(CHRCFLAG_00000040) \ set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE) \
set_accuracy(50) \ set_accuracy(50) \
set_target_chr(holoclone) \ set_target_chr(holoclone) \
label(0x04) \ label(0x04) \
@ -1919,13 +1919,13 @@ u8 func041f_holoclone[] = {
set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
u8 func0420_taker_holo1[] = { u8 func0420_taker_holo1[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
holo_taker_logic(CHR_HOLOCLONE1) holo_taker_logic(CHR_HOLOCLONE1)
endlist endlist
}; };
u8 func0421_taker_holo2[] = { u8 func0421_taker_holo2[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
assign_sound(SFX_M0_WHAT_THE, CHANNEL_6) assign_sound(SFX_M0_WHAT_THE, CHANNEL_6)
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01) play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
@ -1937,7 +1937,7 @@ u8 func0421_taker_holo2[] = {
}; };
u8 func0422_taker_holo3[] = { u8 func0422_taker_holo3[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
holo_taker_logic(CHR_HOLOCLONE3) holo_taker_logic(CHR_HOLOCLONE3)
endlist endlist
}; };
@ -2288,7 +2288,7 @@ u8 func042e_taker_device_m[] = {
endloop(0xba) endloop(0xba)
label(0xbb) label(0xbb)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_accuracy(50) set_accuracy(50)
set_target_chr(CHR_HOSTAGE_DEVICE_M) set_target_chr(CHR_HOSTAGE_DEVICE_M)
set_ailist(CHR_SELF, AILIST_TAKER_ATTACK) set_ailist(CHR_SELF, AILIST_TAKER_ATTACK)
@ -2341,7 +2341,7 @@ u8 func0430_taker_device_f[] = {
endloop(0xbc) endloop(0xbc)
label(0x2e) label(0x2e)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_accuracy(50) set_accuracy(50)
set_target_chr(CHR_HOSTAGE_DEVICE_F) set_target_chr(CHR_HOSTAGE_DEVICE_F)
set_ailist(CHR_SELF, AILIST_TAKER_ATTACK) set_ailist(CHR_SELF, AILIST_TAKER_ATTACK)
@ -2541,7 +2541,7 @@ u8 func0436_taker_info_m[] = {
endloop(0x0a) endloop(0x0a)
label(0x08) label(0x08)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_accuracy(50) set_accuracy(50)
set_target_chr(CHR_HOSTAGE_INFO_M) set_target_chr(CHR_HOSTAGE_INFO_M)
set_ailist(CHR_SELF, AILIST_TAKER_ATTACK) set_ailist(CHR_SELF, AILIST_TAKER_ATTACK)
@ -2574,7 +2574,7 @@ u8 func0438_taker_info_f[] = {
endloop(0x0a) endloop(0x0a)
label(0x08) label(0x08)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_accuracy(20) set_accuracy(20)
set_target_chr(CHR_HOSTAGE_INFO_F) set_target_chr(CHR_HOSTAGE_INFO_F)
set_ailist(CHR_SELF, AILIST_TAKER_ATTACK) set_ailist(CHR_SELF, AILIST_TAKER_ATTACK)
@ -3000,7 +3000,7 @@ u8 func1015_firingrange_pc[] = {
#define topspawner_logic(initfunc, clonefunc) \ #define topspawner_logic(initfunc, clonefunc) \
set_self_chrflag(CHRCFLAG_CLONEABLE) \ set_self_chrflag(CHRCFLAG_CLONEABLE) \
set_self_chrflag(CHRCFLAG_HIDDEN) \ set_self_chrflag(CHRCFLAG_HIDDEN) \
set_self_chrflag(CHRCFLAG_00040000) \ set_self_chrflag(CHRCFLAG_NEVERSLEEP) \
\ \
beginloop(0x04) \ beginloop(0x04) \
if_objective_complete(1, /*goto*/ 0x2e) \ if_objective_complete(1, /*goto*/ 0x2e) \
@ -3137,7 +3137,7 @@ u8 func1016_remove_spawners[] = {
u8 func0410_spawner6[] = { u8 func0410_spawner6[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x04) beginloop(0x04)
chr_toggle_p1p2(CHR_SELF) chr_toggle_p1p2(CHR_SELF)

View File

@ -785,7 +785,7 @@ u8 func1004_check_hangar_doors_opened[] = {
}; };
u8 func040d_elvis_wait_for_hangar_entry[] = { u8 func040d_elvis_wait_for_hangar_entry[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_accuracy(100) set_accuracy(100)
set_reaction_speed(100) set_reaction_speed(100)
add_health_or_armor(200) add_health_or_armor(200)
@ -921,7 +921,7 @@ u8 func040e_elvis_give_ar34[] = {
*/ */
u8 func0409_elvis_follow[] = { u8 func0409_elvis_follow[] = {
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
#endif #endif
set_shotlist(AILIST_ELVIS_FOLLOW) set_shotlist(AILIST_ELVIS_FOLLOW)
set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW) set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW)
@ -1629,7 +1629,7 @@ u8 func1008_hangar_lifts[] = {
u8 func0407_init_knifeable_skedar[] = { u8 func0407_init_knifeable_skedar[] = {
add_health_or_armor(160) add_health_or_armor(160)
set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1) set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_ailist(CHR_SELF, AILIST_KNIFEABLE_SKEDAR) set_ailist(CHR_SELF, AILIST_KNIFEABLE_SKEDAR)
endlist endlist
}; };
@ -1809,7 +1809,7 @@ u8 func0412_hangarspawner[] = {
set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE) set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_morale(0) set_morale(0)
beginloop(LABEL_C2) beginloop(LABEL_C2)
@ -1970,7 +1970,7 @@ u8 func0419_hangar_maian[] = {
u8 func0418_init_hangar_maian[] = { u8 func0418_init_hangar_maian[] = {
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x04) beginloop(0x04)
if_stage_flag_eq(STAGEFLAG_TRIGGER_HANGAR_MAIANS, TRUE, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_TRIGGER_HANGAR_MAIANS, TRUE, /*goto*/ 0x06)
@ -2292,7 +2292,7 @@ u8 func0415_bridgespawner[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_chr_cloaked(CHR_SELF, TRUE, FALSE) set_chr_cloaked(CHR_SELF, TRUE, FALSE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_morale(0) set_morale(0)
beginloop(LABEL_C2) beginloop(LABEL_C2)
@ -2916,12 +2916,12 @@ u8 func1003_intro[] = {
unset_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE)
set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000) set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000)
set_chr_chrflag(CHR_CASS, CHRCFLAG_00000001) set_chr_chrflag(CHR_CASS, CHRCFLAG_FORCETOGROUND)
chr_do_animation(ANIM_CUT_LEE_INTRO_CASS, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_CASS, 2) chr_do_animation(ANIM_CUT_LEE_INTRO_CASS, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_CASS, 2)
unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE) unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE)
set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000) set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000)
set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_00000001) set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_FORCETOGROUND)
chr_do_animation(ANIM_CUT_LEE_INTRO_SKEDAR, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_SKEDAR, 2) chr_do_animation(ANIM_CUT_LEE_INTRO_SKEDAR, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_SKEDAR, 2)
remove_chr(CHR_INTRO_SKEDAR) remove_chr(CHR_INTRO_SKEDAR)
@ -3133,7 +3133,7 @@ u8 func0421_bridge_skedar[] = {
// Not injured // Not injured
label(0x08) label(0x08)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
label(LABEL_C6) label(LABEL_C6)
if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06)
set_target_chr(CHR_BOND) set_target_chr(CHR_BOND)
@ -3321,7 +3321,7 @@ u8 func1016_msg_ifwecontrolthebridge[] = {
u8 func0422_cass[] = { u8 func0422_cass[] = {
set_shotlist(GAILIST_IDLE) set_shotlist(GAILIST_IDLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
run_to_pad(PAD_LEE_01DD) run_to_pad(PAD_LEE_01DD)
beginloop(0x08) beginloop(0x08)
@ -3359,8 +3359,8 @@ u8 func0422_cass[] = {
u8 func0423_shy_skedar[] = { u8 func0423_shy_skedar[] = {
set_shotlist(AILIST_INIT_SKEDAR) set_shotlist(AILIST_INIT_SKEDAR)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_target_chr(CHR_CASS) set_target_chr(CHR_CASS)
goto_next(0x2c) goto_next(0x2c)

View File

@ -4279,7 +4279,7 @@ u8 func0429_spawn_while_xraying[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
restart_timer restart_timer
beginloop(0x04) beginloop(0x04)

View File

@ -1434,7 +1434,7 @@ u8 func0411_init_hangar_guard1[] = {
set_shield(0) set_shield(0)
set_squadron(SQUADRON_0B) set_squadron(SQUADRON_0B)
set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1) set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_id(0x2c) set_chr_id(0x2c)
set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0) set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
@ -1456,7 +1456,7 @@ u8 func0412_init_hangar_guard2[] = {
set_shield(0) set_shield(0)
set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1) set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
set_squadron(SQUADRON_0B) set_squadron(SQUADRON_0B)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_id(0x2d) set_chr_id(0x2d)
set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0) set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
@ -1478,7 +1478,7 @@ u8 func0413_init_hangar_guard3[] = {
set_shield(0) set_shield(0)
set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1) set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
set_squadron(SQUADRON_0B) set_squadron(SQUADRON_0B)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_id(0x2e) set_chr_id(0x2e)
set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0) set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
@ -1500,7 +1500,7 @@ u8 func0414_init_hangar_guard4[] = {
set_shield(0) set_shield(0)
set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1) set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
set_squadron(SQUADRON_0B) set_squadron(SQUADRON_0B)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_chr_id(0x2f) set_chr_id(0x2f)
set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0) set_self_flag_bankx(CHRFLAG0_CAMP, BANK_0)
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
@ -1532,7 +1532,7 @@ u8 func0415_alert_when_stopped[] = {
* This is NOT assigned to Jon. * This is NOT assigned to Jon.
*/ */
u8 func0417_traitor[] = { u8 func0417_traitor[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_self_flag_bankx(CHRFLAG1_PREWARNED, BANK_1) set_self_flag_bankx(CHRFLAG1_PREWARNED, BANK_1)
set_accuracy(100) set_accuracy(100)
set_reaction_speed(100) set_reaction_speed(100)
@ -2694,7 +2694,7 @@ u8 func0419_clone_spawner[] = {
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif #endif
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x04) beginloop(0x04)
if_stage_flag_eq(STAGEFLAG_ENTERED_FINAL_HANGAR, TRUE, /*goto*/ 0x2e) if_stage_flag_eq(STAGEFLAG_ENTERED_FINAL_HANGAR, TRUE, /*goto*/ 0x2e)

View File

@ -745,7 +745,7 @@ u8 func1400_setup_counterop[] = {
u8 func040b_init_elvis[] = { u8 func040b_init_elvis[] = {
set_self_chrflag(CHRCFLAG_RUNFASTER) set_self_chrflag(CHRCFLAG_RUNFASTER)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_PUSHABLE) set_self_chrflag(CHRCFLAG_PUSHABLE)
set_accuracy(100) set_accuracy(100)
set_reaction_speed(100) set_reaction_speed(100)
@ -902,9 +902,9 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = {
set_self_chrflag(CHRCFLAG_PUSHABLE) set_self_chrflag(CHRCFLAG_PUSHABLE)
play_sound(SFX_8148, -1) play_sound(SFX_8148, -1)
set_lights_state(0x003c, LIGHTOP_4, 0x00, 0xff, 0xb4) set_lights_state(0x003c, LIGHTOP_4, 0x00, 0xff, 0xb4)
set_chr_chrflag(0x14, CHRCFLAG_00040000) set_chr_chrflag(0x14, CHRCFLAG_NEVERSLEEP)
set_chr_chrflag(0x15, CHRCFLAG_00040000) set_chr_chrflag(0x15, CHRCFLAG_NEVERSLEEP)
set_chr_chrflag(0x16, CHRCFLAG_00040000) set_chr_chrflag(0x16, CHRCFLAG_NEVERSLEEP)
unset_chr_chrflag(0x14, CHRCFLAG_INVINCIBLE) unset_chr_chrflag(0x14, CHRCFLAG_INVINCIBLE)
unset_chr_chrflag(0x15, CHRCFLAG_INVINCIBLE) unset_chr_chrflag(0x15, CHRCFLAG_INVINCIBLE)
unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE) unset_chr_chrflag(0x16, CHRCFLAG_INVINCIBLE)
@ -3141,14 +3141,14 @@ u8 func041b_sniper_wait_for_detection[] = {
label(0x06) label(0x06)
increase_squadron_alertness(100) increase_squadron_alertness(100)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_cloaked(CHR_SELF, TRUE, TRUE) set_chr_cloaked(CHR_SELF, TRUE, TRUE)
set_ailist(CHR_SELF, AILIST_SNIPER) set_ailist(CHR_SELF, AILIST_SNIPER)
endlist endlist
}; };
u8 func041d_sniper[] = { u8 func041d_sniper[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shotlist(AILIST_SNIPER) set_shotlist(AILIST_SNIPER)
set_chr_cloaked(CHR_SELF, TRUE, FALSE) set_chr_cloaked(CHR_SELF, TRUE, FALSE)
if_chr_dead(CHR_SELF, /*goto*/ 0x06) if_chr_dead(CHR_SELF, /*goto*/ 0x06)
@ -3369,7 +3369,7 @@ u8 func040f_miniskedar_send_clones[] = {
dprint 'D','E','T','E','C','T','E','D','\n',0, dprint 'D','E','T','E','C','T','E','D','\n',0,
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x04) beginloop(0x04)
goto_next(0x52) goto_next(0x52)
@ -3559,7 +3559,7 @@ u8 func0411_hide[] = {
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif #endif
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_ailist(CHR_SELF, GAILIST_IDLE) set_ailist(CHR_SELF, GAILIST_IDLE)
endlist endlist
@ -3579,7 +3579,7 @@ u8 func0413_cloak_and_hide[] = {
stop_chr stop_chr
yield yield
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_ailist(CHR_SELF, GAILIST_IDLE) set_ailist(CHR_SELF, GAILIST_IDLE)
endlist endlist

View File

@ -1952,7 +1952,7 @@ u8 func041b_init_robot[] = {
}; };
u8 func041a_robot[] = { u8 func041a_robot[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_maxdamage(CHR_SELF, VERSION >= VERSION_NTSC_1_0 ? 1 : 40) set_chr_maxdamage(CHR_SELF, VERSION >= VERSION_NTSC_1_0 ? 1 : 40)
if_chr_dead(CHR_SELF, /*goto*/ 0x0c) if_chr_dead(CHR_SELF, /*goto*/ 0x0c)
assign_path(0) assign_path(0)
@ -2365,7 +2365,7 @@ u8 func041f_alarm_responder[] = {
set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0) set_self_flag_bankx(CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(90) set_alertness(90)
set_self_chrflag(CHRCFLAG_00000200) set_self_chrflag(CHRCFLAG_CANCHANGEACTDURINGARGH)
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_SEARCH_FOR_PLAYER) set_ailist(CHR_SELF, GAILIST_SEARCH_FOR_PLAYER)

View File

@ -858,7 +858,7 @@ u8 func1006_hijack[] = {
u8 func0403_stripes[] = { u8 func0403_stripes[] = {
set_returnlist(CHR_SELF, AILIST_STRIPES) set_returnlist(CHR_SELF, AILIST_STRIPES)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
beginloop(0x04) beginloop(0x04)
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06)
@ -1661,7 +1661,7 @@ u8 func100b_check_president_dead[] = {
}; };
u8 func0409_unused[] = { u8 func0409_unused[] = {
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
beginloop(0x04) beginloop(0x04)
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06)
@ -1701,7 +1701,7 @@ u8 func100c_cockpit_stripes[] = {
add_health_or_armor(0) add_health_or_armor(0)
set_recovery_speed(30) set_recovery_speed(30)
set_shield(0) set_shield(0)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
beginloop(0x04) beginloop(0x04)
chr_toggle_p1p2(CHR_SELF) chr_toggle_p1p2(CHR_SELF)
@ -1767,7 +1767,7 @@ u8 func0413_taker[] = {
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
set_accuracy(50) set_accuracy(50)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
restart_timer restart_timer
// Wait for condition // Wait for condition
@ -2444,7 +2444,7 @@ u8 func040b_defend_president[] = {
u8 func0415_cloner1[] = { u8 func0415_cloner1[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x03) beginloop(0x03)
if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06)
@ -2535,7 +2535,7 @@ u8 func0417_clone1[] = {
u8 func0418_cloner2[] = { u8 func0418_cloner2[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x03) beginloop(0x03)
if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06)
@ -2635,7 +2635,7 @@ u8 func041a_clone2[] = {
u8 func041b_cloner3[] = { u8 func041b_cloner3[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
beginloop(0x03) beginloop(0x03)
if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, TRUE, /*goto*/ 0x06)
@ -2770,7 +2770,7 @@ u8 func041e_blonde[] = {
label(0x06) label(0x06)
label(0x08) label(0x08)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
label(0x68) label(0x68)
if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06)
try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x75) try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x75)
@ -2886,7 +2886,7 @@ u8 func0421_trent_waiting[] = {
set_chr_team(CHR_SELF, TEAM_04) set_chr_team(CHR_SELF, TEAM_04)
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
set_shield(500) set_shield(500)
set_chr_chrflag(CHR_TRENT, CHRCFLAG_INVINCIBLE) set_chr_chrflag(CHR_TRENT, CHRCFLAG_INVINCIBLE)

View File

@ -1208,7 +1208,7 @@ u8 func1006_activate_alarm[] = {
u8 func0410_clone_spawner[] = { u8 func0410_clone_spawner[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
// Wait until alarm activated // Wait until alarm activated
beginloop(0x0d) beginloop(0x0d)
@ -1267,7 +1267,7 @@ u8 func0411_init_clone[] = {
}; };
u8 func0412_clone[] = { u8 func0412_clone[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_returnlist(CHR_SELF, GAILIST_ALERTED) set_returnlist(CHR_SELF, GAILIST_ALERTED)
set_ailist(CHR_SELF, GAILIST_ALERTED) set_ailist(CHR_SELF, GAILIST_ALERTED)
endlist endlist
@ -1276,7 +1276,7 @@ u8 func0412_clone[] = {
u8 func0410_clone_spawner2[] = { u8 func0410_clone_spawner2[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
// Wait until player is in room 0x005e // Wait until player is in room 0x005e
beginloop(0x0d) beginloop(0x0d)

View File

@ -855,7 +855,7 @@ u8 func0404_miniskedar[] = {
u8 func0407_init_cloaked_skedar[] = { u8 func0407_init_cloaked_skedar[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED)
beginloop(0x04) beginloop(0x04)
@ -884,7 +884,7 @@ u8 func0408_cloaked_skedar[] = {
set_chr_team(CHR_SELF, TEAM_ENEMY) set_chr_team(CHR_SELF, TEAM_ENEMY)
rebuild_teams rebuild_teams
rebuild_squadrons rebuild_squadrons
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_BASICGUARD) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_BASICGUARD)
@ -922,7 +922,7 @@ u8 func0408_cloaked_skedar[] = {
u8 func0404_miniskedar_spawner[] = { u8 func0404_miniskedar_spawner[] = {
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_morale(0) set_morale(0)
// Wait until player near trigger pad // Wait until player near trigger pad
@ -1700,7 +1700,7 @@ u8 func0409_reaper_slayer_skedar[] = {
// Healthy // Healthy
label(0x08) label(0x08)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
label(0x5e) label(0x5e)
if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06) if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06)
set_target_chr(CHR_BOND) set_target_chr(CHR_BOND)
@ -2045,7 +2045,7 @@ u8 func040d_king_combat[] = {
endloop(0x7f) endloop(0x7f)
label(0x2d) label(0x2d)
set_self_chrflag(CHRCFLAG_00000040) set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
beginloop(0x7a) beginloop(0x7a)
if_chr_death_animation_finished(CHR_P1P2, /*goto*/ LABEL_PLAYER_DEAD) if_chr_death_animation_finished(CHR_P1P2, /*goto*/ LABEL_PLAYER_DEAD)
@ -2298,7 +2298,7 @@ u8 func040e_king_skedar_spawner[] = {
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif #endif
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_WARPONSCREEN) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_WARPONSCREEN)
beginloop(0x04) beginloop(0x04)
@ -2339,7 +2339,7 @@ u8 func040e_king_skedar_spawner[] = {
}; };
u8 func0410_init_king_skedar_clone[] = { u8 func0410_init_king_skedar_clone[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED)
yield yield
@ -2361,7 +2361,7 @@ u8 func0411_king_miniskedar_spawner[] = {
#if VERSION >= VERSION_NTSC_1_0 #if VERSION >= VERSION_NTSC_1_0
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)
#endif #endif
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_WARPONSCREEN) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_WARPONSCREEN)
beginloop(0x04) beginloop(0x04)
@ -2404,7 +2404,7 @@ u8 func0411_king_miniskedar_spawner[] = {
}; };
u8 func0412_init_king_miniskedar_clone[] = { u8 func0412_init_king_miniskedar_clone[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_CLOAKED)
yield yield

View File

@ -503,7 +503,7 @@ u8 func1003_spawn_maians[] = {
}; };
u8 func0405_init_maian[] = { u8 func0405_init_maian[] = {
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_RUNFASTER) set_self_chrflag(CHRCFLAG_RUNFASTER)
set_chr_team(CHR_SELF, TEAM_ALLY) set_chr_team(CHR_SELF, TEAM_ALLY)
set_squadron(GROUP_MAIANS) set_squadron(GROUP_MAIANS)

View File

@ -3290,7 +3290,7 @@ u8 func0416_spawn_during_follow[] = {
add_health_or_armor(40) add_health_or_armor(40)
set_recovery_speed(0) set_recovery_speed(0)
set_shield(0) set_shield(0)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_CLONEABLE)
set_self_chrflag(CHRCFLAG_HIDDEN) set_self_chrflag(CHRCFLAG_HIDDEN)
set_self_chrflag(CHRCFLAG_INVINCIBLE) set_self_chrflag(CHRCFLAG_INVINCIBLE)

View File

@ -1332,7 +1332,7 @@ u8 func0411_cass_in_office[] = {
label(0x2c) label(0x2c)
if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x5a) if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x5a)
set_shotlist(AILIST_CASS_IN_OFFICE) set_shotlist(AILIST_CASS_IN_OFFICE)
set_self_chrflag(CHRCFLAG_00040000) set_self_chrflag(CHRCFLAG_NEVERSLEEP)
if_chr_dead(CHR_CASS, /*goto*/ 0x06) if_chr_dead(CHR_CASS, /*goto*/ 0x06)
if_chr_knockedout(CHR_CASS, /*goto*/ 0x06) if_chr_knockedout(CHR_CASS, /*goto*/ 0x06)
goto_next(0x2c) goto_next(0x2c)