From c351be0c22d79c65bc90035cbfd5c3834e9cb250 Mon Sep 17 00:00:00 2001 From: serge_shubin Date: Wed, 25 Mar 2026 01:01:10 +0800 Subject: [PATCH] Replace non-ASCII characters in comments with ASCII equivalents Em dashes replaced with --, arrows replaced with ->. Co-Authored-By: Claude Opus 4.6 (1M context) --- code/cgame/cg_snapshot.c | 6 +++--- code/game/g_active.c | 2 +- code/game/g_main.c | 4 ++-- code/game/g_session.c | 2 +- code/server/sv_init.c | 6 +++--- code/server/sv_main.c | 2 +- code/server/sv_netdemo.c | 20 ++++++++++---------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/cgame/cg_snapshot.c b/code/cgame/cg_snapshot.c index bce36bb..ee9e405 100644 --- a/code/cgame/cg_snapshot.c +++ b/code/cgame/cg_snapshot.c @@ -185,12 +185,12 @@ static void CG_TransitionSnapshot( void ) { CG_TransitionPlayerState( ps, ops ); } - // server demo: detect follow→free camera transition + // server demo: detect follow->free camera transition if ( cg.svDemoPlayback ) { qboolean wasFollowing = ( ops->pm_flags & PMF_FOLLOW ) != 0; qboolean isFollowing = ( ps->pm_flags & PMF_FOLLOW ) != 0; if ( wasFollowing && !isFollowing ) { - // exiting follow mode — init camera from last known position + // exiting follow mode -- init camera from last known position cg.svDemoFreeCamera = qtrue; cg.svDemoCameraTime = trap_Milliseconds(); VectorCopy( ops->origin, cg.svDemoCameraPs.origin ); @@ -405,7 +405,7 @@ void CG_ProcessSnapshots( void ) { // if time went backwards, we have a level restart or demo seek if ( cg.nextSnap->serverTime < cg.snap->serverTime ) { if ( cg.svDemoPlayback ) { - // demo seek — discard old snap, use nextSnap as current, + // demo seek -- discard old snap, use nextSnap as current, // and wait for another snapshot before rendering cg.snap = cg.nextSnap; cg.nextSnap = NULL; diff --git a/code/game/g_active.c b/code/game/g_active.c index a1e7e82..3651a4e 100644 --- a/code/game/g_active.c +++ b/code/game/g_active.c @@ -1034,7 +1034,7 @@ void ClientThink( int clientNum ) { // phone jack if they don't get any for a while ent->client->lastCmdTime = level.time; - // demo playback: don't run ClientThink_real — cgame owns + // demo playback: don't run ClientThink_real -- cgame owns // the camera movement, G_RunFrame handles buttons and PVS origin if ( g_svDemoPlaying.integer ) { return; diff --git a/code/game/g_main.c b/code/game/g_main.c index 117f6d7..38a86c9 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -1751,7 +1751,7 @@ int start, end; gclient_t *cl = &level.clients[i]; gentity_t *e = &g_entities[i]; - // find the spectator — use client-owned origin for PVS + // find the spectator -- use client-owned origin for PVS if ( e->client && cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam == TEAM_SPECTATOR ) { // copy client-owned origin from usercmd for PVS culling. @@ -1786,7 +1786,7 @@ int start, end; e->s.number = i; } else if ( cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam != TEAM_SPECTATOR ) { - // player left — mark disconnected + // player left -- mark disconnected cl->pers.connected = CON_DISCONNECTED; e->inuse = qfalse; } diff --git a/code/game/g_session.c b/code/game/g_session.c index a8586f8..8e5efc7 100644 --- a/code/game/g_session.c +++ b/code/game/g_session.c @@ -183,7 +183,7 @@ G_WriteSessionData void G_WriteSessionData( void ) { int i; - // don't persist demo spectator sessions — the forced TEAM_SPECTATOR + // don't persist demo spectator sessions -- the forced TEAM_SPECTATOR // would carry over to the next normal game if ( g_svDemoPlaying.integer ) { return; diff --git a/code/server/sv_init.c b/code/server/sv_init.c index 8448195..152094b 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -353,13 +353,13 @@ void SV_SpawnServer( char *server, qboolean killBots ) { // stop any active demo recording/playback (one demo = one map). // SVD_IsStarting() returns true when SVD_Play_f is calling devmap - // internally — don't stop our own playback. + // internally -- don't stop our own playback. if ( SVD_IsRecording() ) { - Com_Printf( "Map change — stopping demo recording.\n" ); + Com_Printf( "Map change -- stopping demo recording.\n" ); SVD_StopRecord_f(); } if ( SVD_IsPlaying() && !SVD_IsStarting() ) { - Com_Printf( "Map change — stopping demo playback.\n" ); + Com_Printf( "Map change -- stopping demo playback.\n" ); SVD_CleanupPlayback(); } diff --git a/code/server/sv_main.c b/code/server/sv_main.c index 27834a3..04e0a35 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -859,7 +859,7 @@ void SV_Frame( int msec ) { time_game = Sys_Milliseconds () - startTime; } - // check timeouts (skip during demo playback — zombie slots would be freed) + // check timeouts (skip during demo playback -- zombie slots would be freed) if ( !SVD_IsPlaying() ) { SV_CheckTimeouts(); } diff --git a/code/server/sv_netdemo.c b/code/server/sv_netdemo.c index ab5f82e..960f44e 100644 --- a/code/server/sv_netdemo.c +++ b/code/server/sv_netdemo.c @@ -246,11 +246,11 @@ static void SVD_WriteFrame( fileHandle_t f ) { demo.prevEntities[i].svFlags = ent->r.svFlags; demo.prevEntities[i].active = qtrue; } else if ( demo.prevEntities[i].active ) { - // entity was removed — write a remove marker + // entity was removed -- write a remove marker MSG_WriteDeltaEntity( &msg, &demo.prevEntities[i].es, NULL, qtrue ); demo.prevEntities[i].active = qfalse; } - // else: entity was inactive and still inactive — write nothing + // else: entity was inactive and still inactive -- write nothing } // end of entities marker @@ -600,7 +600,7 @@ static qboolean SVD_ReadHeader( fileHandle_t f ) { FS_Read( demo.playMapName, SVDEMO_MAX_MAPNAME, f ); demo.playMapName[SVDEMO_MAX_MAPNAME - 1] = '\0'; - // read configstrings — store for re-application after map load + // read configstrings -- store for re-application after map load { short idx; while (1) { @@ -633,7 +633,7 @@ Called after devmap finishes in SVD_Play_f. static void SVD_ApplyConfigstrings( void ) { int i; for ( i = 0; i < MAX_CONFIGSTRINGS; i++ ) { - // skip CS_SERVERINFO and CS_SYSTEMINFO — they contain latched cvars + // skip CS_SERVERINFO and CS_SYSTEMINFO -- they contain latched cvars // (sv_maxclients, sv_pure, etc.) that would trigger a map restart if ( i == CS_SERVERINFO || i == CS_SYSTEMINFO ) { continue; @@ -744,7 +744,7 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) { demo.playPrevEntities[entNum].active = qtrue; // apply to server entity and link for PVS. - // use trBase as initial origin — G_RunFrame will refine with + // use trBase as initial origin -- G_RunFrame will refine with // BG_EvaluateTrajectory for moving entities (rockets etc). ent = SV_GentityNum( entNum ); ent->s = newEs; @@ -839,7 +839,7 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) { if ( len > 0 && len < (short)sizeof(buf) ) { FS_Read( buf, len, f ); buf[len - 1] = '\0'; - // broadcast — only the spectator is CS_ACTIVE, zombies are skipped + // broadcast -- only the spectator is CS_ACTIVE, zombies are skipped SV_SendServerCommand( NULL, "%s", buf ); } } @@ -1025,7 +1025,7 @@ void SVD_Pause_f( void ) { } demo.paused = !demo.paused; if ( !demo.paused ) { - // resuming — toggle SERVERCOUNT to reset client snapshot timing + // resuming -- toggle SERVERCOUNT to reset client snapshot timing // (drifted during pause from identical serverTimes). svs.snapFlagServerBit ^= SNAPFLAG_SERVERCOUNT; } @@ -1047,7 +1047,7 @@ void SVD_Seek_f( void ) { } if ( demo.numKeyframes <= 0 ) { - Com_Printf( "No keyframes in this demo — seeking not available.\n" ); + Com_Printf( "No keyframes in this demo -- seeking not available.\n" ); return; } @@ -1065,7 +1065,7 @@ void SVD_Seek_f( void ) { } if ( bestKf < 0 ) { - // target is before the first keyframe — seek to first + // target is before the first keyframe -- seek to first bestKf = 0; targetTime = demo.keyframeTimes[0]; } @@ -1189,7 +1189,7 @@ qboolean SVD_PlaybackFrame( void ) { } - // manual pause — don't consume demo data + // manual pause -- don't consume demo data if ( demo.paused ) { return qfalse; }