Claim set · data/claims/mgs.yaml

Metal Gear Solid (FoxdieTeam's mgs_reversing)

Game: Metal Gear Solid.

In Metal Gear Solid Integral (SLPM-86247, the Japanese re-release the decompilation builds), a guard's sight check s00a_command_800C9E68 updates its result vision.field_B92 for one guard per commander update, the guard whose field_B78 equals the commander's update count field_0x0C modulo field_0x08, the number of guard slots it loops over; between turns the result stands. Snake can't be seen off the guard's map or with the player status PLAYER_INTRUDE or PLAYER_HIDDEN set. Otherwise he is seen when he is within COM_EYE_LENGTH + 2,000 units (a 3D distance) and within 2,000 units of the guard's height, and either closer than 500 units or less than vision.angle from the guard's facing, with no wall or floor (HZD_OnlineHazardCheck, HZD_CHK_ALL) and no target flagged TARGET_SEEK (GM_OnlineTargetCheckAny) on the line between them. The guard's setup sets vision.angle to 512 of the 4,096 units in a turn, a cone of 45° either side of the facing, 90° across (computed), and vision.length to COM_EYE_LENGTH, 4,000 units unless a stage script's l option sets it; some guard actions set the length to 3,000 or 0. The result is 1 for a sighting beyond vision.length and 2 within it, and 0 whenever Snake has the Stealth item equipped, unless the guard's param_blood is 83. Every frame, s00a_command_800C9D7C moves the guard's alert_level (0 to 255): up 1 at a result of 2, down 1 at 1, and down COM_ALERT_DECREMENT at 0 (4 by default; a stage script's t option of 1 or 2 makes it 3 or 2). On the result-0 branch one exception holds the level where it is instead of lowering it: when the guard's last sighting was a 2 and Snake has PLAYER_INTRUDE or PLAYER_NOHIDDEN set, isn't hidden, and the guard's vision.length isn't 0. mgs/guard-vision

About: Metal Gear Solid Vision cone

Value
{
 "visionAngle": 512,
 "turn": 4096,
 "halfAngleDegrees": 45,
 "eyeLengthDefault": 4000,
 "outerBand": 2000,
 "heightLimit": 2000,
 "nearRadius": 500,
 "alertLevelMax": 255,
 "alertDecrementDefault": 4
}
Codemgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · README.md#L3-L5This project aims to completely reverse engineer *Metal Gear Solid Integral* for PlayStation back to C source code which when compiled produces the same assembly code. … At this moment `SLPM_862.47`/`SLPM_862.48`/`SLPM_862.49` main executables are 100% decompiled.mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · README.md#L189-L192<td><b>s00a</b></td> <td>120 KB</td> <td>Loading Dock</td> <td><b>✔️ 100% decompiled!</b></td>mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · build/linker_command_file.txt#L454-L457include "{{OBJ_DIR}}\enemy\watcher.obj", overlay include "{{OBJ_DIR}}\enemy\check.obj", overlay include "{{OBJ_DIR}}\enemy\action.obj", overlay include "{{OBJ_DIR}}\enemy\enemy.obj", overlaymgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L269-L349flag = &work->vision.field_B92; … dir = GV_VecDir2( &svec ); … dis = GV_VecLen3( &svec ); … diff = pos->vy - work->control.mov.vy; … if ( !( work->control.map->index & GM_PlayerMap ) || GM_PlayerStatus & ( PLAYER_INTRUDE | PLAYER_HIDDEN ) ) { work->vision.field_B92 = 0; return; …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/libgv/util.c#L172-L178int GV_DiffDirAbs( int from, int to ) { int diff; diff = 4095 & ( to - from ); return ( diff <= 2048 ) ? diff : 4096 - diff; }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/game/target.c#L667-L669if ((iter->flag & 0x1) && (iter->class & TARGET_SEEK)) { if (TargetConflict(iter, &tmp) && OnlineTarget(from, to, iter, hit))mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/check.c#L235-L236work->vision.angle = 512; work->vision.length = COM_EYE_LENGTH;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L1179-L1187EnemyCommand.field_0x88.vx = 0xFA0; EnemyCommand.field_0x88.vy = 0xFA0; EnemyCommand.field_0x88.vz = 0xFA0; ops = GCL_GetOption( 'l' ); if ( ops ) { GCL_StrToSV( ops, (short *)&EnemyCommand.field_0x88 ); }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L1201-L1219ops = GCL_GetOption( 't' ); if ( ops ) { EnemyCommand.field_0x88.pad = GCL_StrToInt( ops ); } switch ( EnemyCommand.field_0x88.pad ) { case 0: COM_ALERT_DECREMENT = 4; break; case 1: COM_ALERT_DECREMENT = 3; …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L1046EnemyCommand.field_0x0C++;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L766for ( i = 0; i < EnemyCommand.field_0x08; i++ )mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/action.c#L1455-L1457void ActOverScoutD_800C85DC( WatcherWork* work, int time ) { work->vision.length = 3000;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/action.c#L610-L612void s00a_command_800C6B24( WatcherWork* work, int time ) { work->vision.length = 0;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L224-L255void s00a_command_800C9D7C( WatcherWork* work ) { int val; val = work->vision.field_B92; switch ( val ) { case 0: if ( work->field_B94 != 2 || GM_PlayerStatus & PLAYER_HIDDEN || !( GM_PlayerStatus & ( PLAYER_INTRUDE | PLAYER_NOHIDDEN ) ) || work->vision.length == 0 ) { work->field_B94 = 0; work->alert_level -= COM_ALERT_DECREMENT; } …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L352-L360void EnemyActionMain( WatcherWork *work ) { … s00a_command_800C9878( work ); s00a_command_800C9E68(work); s00a_command_800C9D28(work); s00a_command_800C9D7C(work); Enemy_Think(work);Checked by claude-agent, 2026-10-22 — read each pinned range against every part of the statement; GV_DiffDirAbs for the angle units; the s00a overlay's status in the README and its object list in the linker file

Cited by: Metal Gear Solid, Vision cone

In Metal Gear Solid Integral (SLPM-86247), the enemy commander keeps one alert value and a mode: 0 (TOP_COMM_TRAVEL), 1 (TOP_COMM_ALERT), and 2, which sets GM_AlertMode to ALERT_EVASION; the atlas reads 0 as infiltration. Each update, s00a_command_800CF6A0 sets the value to the highest alert_level among its active guards, or lowers it by 4 when it is more than 4 above that, and raises it to TOPCOMMAND.alert, which the security camera and searchlight code set to 255 (ENE_SetTopCommAL). A patrolling guard (think1 0, think2 0) whose alert_level passes 2, after three frames of full sight from 0 (computed), goes to a reaction state: on its first frame it puts a mark over its head (ENE_PutMark, mark 0), and after 20 updates it switches to its alert routines (think1 1) and sets alert_level to 255. In mode 0, a value of 255 calls GM_AlertModeSet(3) (ALERT_ACTIVE), which plays SE_ALERT_SIREN when the mode was ALERT_OFF, and enters mode 1; it adds 1 to GM_EnemyWatchCount unless COM_GameStatus bit 2 is set. Once the commander leaves mode 0, every guard still in its patrol routines switches to its alert routines. Mode 1 has no timer: it lasts until the value falls to 0, which starts mode 2 with a counter of 300 that drops by 1 each update. A value of 255 during mode 2 returns to mode 1; when the counter runs out, the commander returns to mode 0 and ALERT_OFF. The game waits DG_FrameRate = 2 vertical blanks per frame, 30 frames a second on a 60 Hz display, so the evasion phase lasts 10 seconds (computed). The stage script's l option sets COM_EYE_LENGTH separately for modes 0, 1, and 2, 4,000 in each by default. mgs/alert-phases

About: Metal Gear Solid Alert phase

Value
{
 "alertTrigger": 255,
 "commanderFallPerUpdate": 4,
 "reactionUpdates": 20,
 "evasionFrames": 300,
 "framesPerSecond": 30,
 "evasionSeconds": 10
}
Codemgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L598-L615void s00a_command_800CF6A0( int val, ENEMY_COMMAND* command ) { if ( command->alert - val > 4 ) { command->alert -= 4; } else { command->alert = val; } if ( command->alert < TOPCOMMAND.alert ) …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L617-L694void s00a_command_800CF704( ENEMY_COMMAND *command ) … switch ( command->mode ) { … case 0: COM_EYE_LENGTH = EnemyCommand.field_0x88.vx; COM_SHOOTRANGE = EnemyCommand.field_0x88.vx + 500; if ( command->alert >= 255 ) { command->alert = 255; GM_AlertModeSet(3); …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L760-L786alert = 0; … for ( i = 0; i < EnemyCommand.field_0x08; i++ ) { if ( EnemyCommand.field_0xC8[ i ].field_04 == 2 ) { watcher = EnemyCommand.field_0xC8[ i ].watcher; alert = s00a_command_800CF688( alert, watcher->alert_level ); … s00a_command_800CF6A0( alert, &EnemyCommand ); s00a_command_800CF704( &EnemyCommand );mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L588-L596int s00a_command_800CF688( int a0, int a1 ) { if ( a0 < a1 ) { a0 = a1; } return a0; }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.h#L536-L537#define TOP_COMM_TRAVEL 0 #define TOP_COMM_ALERT 1mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/game/g_define.h#L177-L182enum { ALERT_OFF = 0, ALERT_JAMMING = 1, ALERT_EVASION = 2, ALERT_ACTIVE = 3 };mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/camera.c#L260-L262if (field_1EC == 35) { ENE_SetTopCommAL(255);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/searchli.c#L448-L450if (s01a_searchli_800D73D8(work)) { ENE_SetTopCommAL(255);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L1955-L1959else if ( work->alert_level > 2 ) { ENE_SetGopointLast(); s00a_command_800CB240( work ); }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L385-L390void s00a_command_800CB240( WatcherWork* work ) { work->think2 = 7; work->think3 = 14; work->count3 = 0; }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L2324-L2343void s00a_command_800CDD80( WatcherWork *work ) { switch( work->think3 ) { case 14: if ( s00a_command_800CBDFC( work ) ) { s00a_command_800CB2C8( work ); … work->alert_level = 255;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L929-L951int s00a_command_800CBDFC( WatcherWork* work ) … if ( count == 0 ) { ENE_PutMark( work, 0 ); … if ( count < 20 ) { work->pad.press |= 0x20; work->count3++; return 0; } …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L411-L418void s00a_command_800CB2C8( WatcherWork *work ) { work->think1 = 1; work->think2 = 9;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L2688-L2736void s00a_command_800CE634( WatcherWork *work ) { switch( work->think2 ) { … case 0: s00a_command_800CD210( work ); break; … if ( EnemyCommand.mode == TOP_COMM_TRAVEL ) { return; …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L2832-L2840switch ( work->think1 ) { case 0: work->unknown.field_1E = 1; s00a_command_800CE634( work ); break; case 1: work->unknown.field_1E = 1; s00a_command_800CE778( work );mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/game/alert.c#L193-L204if ( new_alert_mode >= 0 && new_alert_mode != GM_AlertMode ) { if ( song_status == 0 ) { switch ( new_alert_mode ) { case ALERT_ACTIVE: if ( GM_AlertMode == ALERT_OFF ) { GM_SeSet2( 0, 0x3F, SE_ALERT_SIREN );mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L1039-L1046s00a_command_800D018C( work ); … s00a_command_800CFA94( work ); … EnemyCommand.field_0x0C++;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/libdg/dgd.c#L24int DG_FrameRate = 2;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/libdg/dgd.c#L77-L79else { mts_wait_vbl( DG_FrameRate );Checked by claude-agent, 2026-10-22 — read each pinned range against every part of the statement; traced the patrol routine's stimulus order to the reaction state and its 20-update count; the commander's Act for the update count

Cited by: Alert phase, Metal Gear Solid

In Metal Gear Solid Integral (SLPM-86247), a noise is a power, a length, and a position (GM_SetNoise), and a noise replaces the current one only if its power is higher, or equal with a length at least as long. A guard whose field_BA3 bit 1 is set (its setup sets it) hears the current noise by its power (s00a_command_800C9930): 5 within 1,500 units, 200 within COM_NOISEMODE_DIS (8,000 by default; a stage script's y option sets it), 255 at any distance, and 100 only if it is the guard the commander picked; for every power but 255 the guard must be on Snake's map, and 255 has its own test on GM_ClaymoreMap. Other powers aren't heard, such as the 4 of Snake's kick. For a 100, the commander (s00a_command_800CF9A0), outside mode 1, picks the guard within COM_NOISEMODE_DIS of the noise whose HZD_ZoneDistance to it is under 300 and least; that guard hears it and clears it, so one guard answers. Knocking on a wall makes a 100: sna_knock_80054D68 probes the wall beside Snake and, when the surface's attribute code is under 4, starts NewAfterSe, which 6 frames later plays the knock and calls GM_SetNoise(100, 16) at Snake's position. A footstep makes a 100 when Snake isn't in a duct (PLAYER_INTRUDE) and the stage script's n list gives the floor under him a nonzero noise flag. Explosions (blast.c) and stun grenades (stngrnd.c) make a 255. A patrolling guard (think2 0, s00a_command_800CD210) answers a heard noise (field_BA1 bit 1) after bits 4 and 2 and before footprints (bit 16) and sight; for a 255 it goes to the same reaction state as a sighting (think2 7), which after 21 updates (computed) sets its alert_level to 255. mgs/noise

About: Metal Gear Solid Noise detection

Value
{
 "quietRadius": 1500,
 "loudRadiusDefault": 8000,
 "nearestZoneLimit": 300,
 "knockPower": 100,
 "knockDelayFrames": 6,
 "footstepPower": 100,
 "explosionPower": 255,
 "kickPower": 4
}
Codemgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/game/g_macro.h#L74-L84static inline void GM_SetNoise( int power, int length, SVECTOR *pos ) { int old ; old = GM_NoisePower ; if ( power < old ) return ; if ( power == old && length < GM_NoiseLength ) return ; GM_NoisePower = power ; GM_NoiseLength = length ; GM_NoisePosition = *pos ; }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L62-L130void s00a_command_800C9930( WatcherWork* work ) { CONTROL *ctrl; if ( !( work->field_BA3 & 1 ) ) { return; } … if ( GM_NoisePower == 0xFF ) { … if ( !( ctrl->map->index & GM_ClaymoreMap ) && …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/watcher.c#L677work->field_BA3 = 7;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L1190-L1196COM_NOISEMODE_DIS = 0x1F40; ops = GCL_GetOption( 'y' ); if ( ops ) { COM_NOISEMODE_DIS = GCL_StrToInt( ops ); }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L714-L750int s00a_command_800CF9A0( WatcherWork *work, int dis, int idx ) … if ( TOPCOMMAND.mode == 1 ) { goto exit; } if ( GM_NoisePower != 0x64 ) { goto exit; } … …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/command.c#L697-L711int s00a_command_800CF940( HZD_HDL *hzd, SVECTOR *pos, SVECTOR *pos2 ) … from = HZD_GetAddress( hzd, pos, -1 ); … to = HZD_GetAddress( hzd, pos2, -1 ); do { return HZD_ZoneDistance( hzd, from & 0xFF, to & 0xFF );mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/chara/snake/sna_init.c#L4128-L4137if (sna_8004F628(work, &vec, -250, HZD_CHK_D_SEGMENT | HZD_CHK_F_SEGMENT, SEGMENT_ATR, var_t0)) { temp_v0 = HZD_GetOnlineHazardAtr(); code = (temp_v0 >> 8) & 7; if (code < 4) { temp_v0 = GM_GetNoiseSound(temp_v0, 0); noise = temp_v0; NewAfterSe(noise, 6);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/chara/snake/afterse.c#L14-L22static void Act(Work *work) { if ( --work->time == 0 ) { // Play the sound GM_SeSetMode(&GM_PlayerPosition, work->sound, GM_SEMODE_BOMB); // Allow soliders/chavs/whatever to hear it GM_SetNoise(100, 16, &GM_PlayerPosition);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/asioto.c#L104-L120else { index = asioto_800C396C(work); … bank2 = asioto_800C392C(work); if (bank2 >= 0) { GM_SeSet(&GM_PlayerPosition, work->se[bank2][index]); if (work->noise[bank2] != 0) { GM_SetNoise(100, 4, &GM_PlayerPosition); …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/asioto.c#L90-L92if (GM_PlayerStatus & PLAYER_INTRUDE) { if (GM_PlayerStatus & PLAYER_MOVE)mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/asioto.c#L193-L202if (GCL_GetOption('n')) … work->noise[i] = GCL_StrToInt(GCL_NextStr());mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/chara/snake/sna_init.c#L6847-L6854sound = SE_KICK_SWING; … GM_SetNoise(4, 2, &work->control.mov);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/bullet/blast.c#L170GM_SetNoise(255, 32, &work->pos);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/okajima/stngrnd.c#L224GM_SetNoise(255, 32, &work->field_E0);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L1939-L1954if ( work->field_BA1 & 4 ) { s00a_command_800CB3F0( work ); } else if ( work->field_BA1 & 2) { s00a_command_800CB610( work ); } else if ( work->field_BA1 & 1) { s00a_command_800CB504( work ); } …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L558-L562case 255: s00a_command_800CAB74( work ); s00a_command_800CEB54(); work->think2 = 7; work->think3 = 16;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L2344-L2356case 16: if ( s00a_command_800CBE90( work ) ) { … work->alert_level = 255;mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L953-L969int s00a_command_800CBE90( WatcherWork* work ) … if ( work->count3 > 20 ) { return 1; } work->count3++;Checked by claude-agent, 2026-10-22 — read each pinned range against every part of the statement; followed the knock from sna_knock to NewAfterSe's Act

Cited by: Metal Gear Solid, Noise detection

In Metal Gear Solid Integral (SLPM-86247), the radar (draw_radar) draws the map only in ALERT_OFF. In ALERT_ACTIVE and ALERT_EVASION, and in ALERT_OFF while GM_GameStatus has STATE_CHAFF or STATE_JAMMING set (shown as ALERT_JAMMING), it draws a status panel (menu_radar_draw_state) in its place, playing SE_RADAR_JAMMED when jamming begins from ALERT_OFF; for alert and evasion the panel draws GM_AlertLevel as a gauge. When the panel ends, the map returns behind a sweep while a counter set to 93 falls by 2 per frame, about 47 frames (computed), with SE_RADAR_CHIME, which the decompilers' comment says plays when evasion or jamming ends. In ALERT_OFF, with no override function set, the radar isn't drawn in a duct (PLAYER_INTRUDE) or with the radar turned off in the options. On the map, each guard's cone comes from its sight: its facing, vision.length, and twice vision.angle as the width (s00a_command_800C9878). mgs/radar

About: Metal Gear Solid Alert phase

Value
{
 "sweepCounter": 93,
 "sweepStep": 2
}
Codemgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/menu/radar.c#L1038-L1170void draw_radar(MenuWork *work, u_long *ot) … alertLevel = GM_AlertLevel; alertMode = GM_AlertMode; … if (alertMode == ALERT_OFF && gFn_radar_800AB48C == NULL) { if (GM_PlayerStatus & PLAYER_INTRUDE) { return; } …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/menu/radar.c#L921-L946void menu_radar_draw_state(MenuWork *work, u_long *ot, int radarMode, int alertLevel) … switch (radarMode) { case ALERT_JAMMING: … default: draw_seg(work->prim, alertLevel, 3 - radarMode);mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L24-L32void s00a_command_800C9878( WatcherWork* work ) { VISION *vision = &work->vision; RADAR_SIGHT_PARAM *r_param = &work->control.radar_param; r_param->dir = vision->facedir; r_param->dis = vision->length; r_param->range = vision->angle * 2;Checked by claude-agent, 2026-10-22 — read each pinned range against every part of the statement

Cited by: Alert phase, Metal Gear Solid

In Metal Gear Solid Integral (SLPM-86247), a guard looks for footprints only if its stage script gives it the c option, which sets field_BA3 bit 0x10, and not in the commander's mode 1, TOP_COMM_ALERT (s00a_command_800C9D28 skips the check there, though not in evasion). The check (s00a_command_800C9C7C) runs when AsiatoCheck passes and the guard isn't already in think2 5, and takes the nearest of the 48 footprint slots (AsiatoPositions) whose pad is 1 that lies within vision.length (a horizontal distance) and less than vision.angle from the guard's facing, with no wall between (SearchNearAsiato): the sight cone, without its 500-unit ring or its outer band. A patrolling guard that finds one goes to think2 5 if none of field_BA1 bits 4, 2, and 1 (the last a heard noise) ranks above it. mgs/footprints

About: Metal Gear Solid Vision cone

Value
{
 "footprintSlots": 48
}
Codemgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/watcher.c#L681-L685opt = GCL_GetOption( 'c' ); if ( opt ) { work->field_BA3 |= 0x10; }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/enemy.c#L179-L222void s00a_command_800C9C7C( WatcherWork* work ) … if ( !( work->field_BA3 & 16 ) ) { return; } … if ( work->think2 == 5 ) { return; } … …mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/asiato.c#L205-L231int SearchNearAsiato( HZD_HDL *hzd, SVECTOR *pos, int facedir, int range, int length ) … for ( i = 0; i < 48 ; i++ ) { if (AsiatoPositions[i].pad == 1 ) { GV_SubVec3( &AsiatoPositions[i], pos, &svec ); svec.vy = 0; len = GV_VecLen3( &svec ); if ( len < max_len && len < length && GV_DiffDirAbs( facedir, GV_VecDir2(&svec) ) < range && !HZD_OnlineHazardCheck(hzd, pos, &AsiatoPositions[i], HZD_CHK_ALL, SEGMENT_ATR) )mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L1951-L1954else if ( work->field_BA1 & 16 ) { s00a_command_800CB628( work ); }mgs_reversing: a matching decompilation of Metal Gear Solid Integral for the PlayStation (FoxdieTeam/mgs_reversing) · source/enemy/think.c#L590-L593void s00a_command_800CB628( WatcherWork *work ) { work->think2 = 5;Checked by claude-agent, 2026-10-22 — read each pinned range against every part of the statement

Cited by: Metal Gear Solid