mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Change atof() to strtod()
This commit is contained in:
parent
67dbe816c9
commit
881b935b65
7 changed files with 20 additions and 20 deletions
|
@ -216,7 +216,7 @@ void CL_PredictMovement (void) {
|
|||
/* copy current state to pmove */
|
||||
pm.trace = CL_PMTrace;
|
||||
pm.pointcontents = CL_PMpointcontents;
|
||||
pm_airaccelerate = atof(cl.configstrings[CS_AIRACCEL]);
|
||||
pm_airaccelerate = strtod(cl.configstrings[CS_AIRACCEL], (char **)NULL);
|
||||
pm.s = cl.frame.playerstate.pmove;
|
||||
|
||||
VectorSet (pm.mins, -16, -16, -24);
|
||||
|
|
|
@ -312,15 +312,15 @@ void SCR_Sky_f (void) {
|
|||
}
|
||||
|
||||
if (Cmd_Argc() > 2)
|
||||
rotate = (float)atof(Cmd_Argv(2));
|
||||
rotate = (float)strtod(Cmd_Argv(2), (char **)NULL);
|
||||
|
||||
else
|
||||
rotate = 0;
|
||||
|
||||
if (Cmd_Argc() == 6) {
|
||||
axis[0] = (float)atof(Cmd_Argv(3));
|
||||
axis[1] = (float)atof(Cmd_Argv(4));
|
||||
axis[2] = (float)atof(Cmd_Argv(5));
|
||||
axis[0] = (float)strtod(Cmd_Argv(3), (char **)NULL);
|
||||
axis[1] = (float)strtod(Cmd_Argv(4), (char **)NULL);
|
||||
axis[2] = (float)strtod(Cmd_Argv(5), (char **)NULL);
|
||||
|
||||
} else {
|
||||
axis[0] = 0;
|
||||
|
|
|
@ -286,7 +286,7 @@ void CL_PrepRefresh (void) {
|
|||
/* set sky textures and speed */
|
||||
Com_Printf ("sky\r", i);
|
||||
SCR_UpdateScreen ();
|
||||
rotate = (float)atof (cl.configstrings[CS_SKYROTATE]);
|
||||
rotate = (float)strtod(cl.configstrings[CS_SKYROTATE], (char **)NULL);
|
||||
sscanf (cl.configstrings[CS_SKYAXIS], "%f %f %f",
|
||||
&axis[0], &axis[1], &axis[2]);
|
||||
re.SetSky (cl.configstrings[CS_SKY], rotate, axis);
|
||||
|
|
|
@ -2401,9 +2401,9 @@ static void StartServerActionFunc( void *self ) {
|
|||
|
||||
strcpy( startmap, strchr( mapnames[s_startmap_list.curvalue], '\n' ) + 1 );
|
||||
|
||||
maxclients = (float)atof( s_maxclients_field.buffer );
|
||||
timelimit = (float)atof( s_timelimit_field.buffer );
|
||||
fraglimit = (float)atof( s_fraglimit_field.buffer );
|
||||
maxclients = (float)strtod( s_maxclients_field.buffer, (char **)NULL );
|
||||
timelimit = (float)strtod( s_timelimit_field.buffer, (char **)NULL );
|
||||
fraglimit = (float)strtod( s_fraglimit_field.buffer, (char **)NULL );
|
||||
|
||||
Cvar_SetValue( "maxclients", ClampCvar( 0, maxclients, maxclients ) );
|
||||
Cvar_SetValue ("timelimit", ClampCvar( 0, timelimit, timelimit ) );
|
||||
|
|
|
@ -793,13 +793,13 @@ OGG_SeekCmd ( void )
|
|||
switch ( Cmd_Argv( 1 ) [ 0 ] )
|
||||
{
|
||||
case '>':
|
||||
OGG_Seek( REL, atof( Cmd_Argv( 1 ) + 1 ) );
|
||||
OGG_Seek( REL, strtod( Cmd_Argv( 1 ) + 1 , (char **)NULL ) );
|
||||
break;
|
||||
case '<':
|
||||
OGG_Seek( REL, -atof( Cmd_Argv( 1 ) + 1 ) );
|
||||
OGG_Seek( REL, -strtod( Cmd_Argv( 1 ) + 1, (char **)NULL ) );
|
||||
break;
|
||||
default:
|
||||
OGG_Seek( ABS, atof( Cmd_Argv( 1 ) ) );
|
||||
OGG_Seek( ABS, strtod( Cmd_Argv( 1 ), (char **)NULL ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ float Cvar_VariableValue (char *var_name)
|
|||
if (!var)
|
||||
return 0;
|
||||
|
||||
return atof (var->string);
|
||||
return strtod(var->string, (char **)NULL);
|
||||
}
|
||||
|
||||
const char *Cvar_VariableString (const char *var_name)
|
||||
|
@ -141,7 +141,7 @@ cvar_t *Cvar_Get (char *var_name, char *var_value, int flags)
|
|||
var->name = CopyString (var_name);
|
||||
var->string = CopyString (var_value);
|
||||
var->modified = true;
|
||||
var->value = atof (var->string);
|
||||
var->value = strtod(var->string, (char **)NULL);
|
||||
|
||||
/* link the variable in */
|
||||
var->next = cvar_vars;
|
||||
|
@ -205,7 +205,7 @@ cvar_t *Cvar_Set2 (char *var_name, char *value, qboolean force)
|
|||
else
|
||||
{
|
||||
var->string = CopyString(value);
|
||||
var->value = (float)atof (var->string);
|
||||
var->value = (float)strtod(var->string, (char **)NULL);
|
||||
|
||||
if (!strcmp(var->name, "game"))
|
||||
{
|
||||
|
@ -238,7 +238,7 @@ cvar_t *Cvar_Set2 (char *var_name, char *value, qboolean force)
|
|||
Z_Free (var->string);
|
||||
|
||||
var->string = CopyString(value);
|
||||
var->value = atof (var->string);
|
||||
var->value = strtod(var->string, (char **)NULL);
|
||||
|
||||
return var;
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ cvar_t *Cvar_FullSet (char *var_name, char *value, int flags)
|
|||
Z_Free (var->string);
|
||||
|
||||
var->string = CopyString(value);
|
||||
var->value = (float)atof (var->string);
|
||||
var->value = (float)strtod(var->string, (char **)NULL);
|
||||
|
||||
var->flags = flags;
|
||||
|
||||
|
@ -307,7 +307,7 @@ void Cvar_GetLatchedVars (void)
|
|||
Z_Free (var->string);
|
||||
var->string = var->latched_string;
|
||||
var->latched_string = NULL;
|
||||
var->value = atof(var->string);
|
||||
var->value = strtod(var->string, (char **)NULL);
|
||||
|
||||
if (!strcmp(var->name, "game"))
|
||||
{
|
||||
|
|
|
@ -403,10 +403,10 @@ ED_ParseField(const char *key, const char *value, edict_t *ent)
|
|||
*(int *)(b + f->ofs) = (int)strtol(value, (char **)NULL, 10);
|
||||
break;
|
||||
case F_FLOAT:
|
||||
*(float *)(b + f->ofs) = atof(value);
|
||||
*(float *)(b + f->ofs) = strtod(value, (char **)NULL);
|
||||
break;
|
||||
case F_ANGLEHACK:
|
||||
v = atof(value);
|
||||
v = strtod(value, (char **)NULL);
|
||||
((float *)(b + f->ofs))[0] = 0;
|
||||
((float *)(b + f->ofs))[1] = v;
|
||||
((float *)(b + f->ofs))[2] = 0;
|
||||
|
|
Loading…
Reference in a new issue