"DP_EF_BLUE "
"DP_EF_FLAME "
"DP_EF_FULLBRIGHT "
+"DP_EF_NODEPTHTEST "
"DP_EF_NODRAW "
"DP_EF_NOSHADOW "
"DP_EF_RED "
"KRIMZON_SV_PARSECLIENTCOMMAND "
"NEH_CMD_PLAY2 "
"NEH_RESTOREGAME "
+"NXQ_GFX_LETTERBOX "
"TENEBRAE_GFX_DLIGHTS "
"TW_SV_STEPCONTROL "
;
yaw = 0;
else
{
- yaw = (int) (atan2(value1[1], value1[0]) * 180 / M_PI);
+ yaw = (atan2(value1[1], value1[0]) * 180 / M_PI);
if (yaw < 0)
yaw += 360;
}
*/
void PF_vectoangles (void)
{
- float *value1;
- float forward;
- float yaw, pitch;
+ double value1[3], forward, yaw, pitch;
- value1 = G_VECTOR(OFS_PARM0);
+ VectorCopy(G_VECTOR(OFS_PARM0), value1);
if (value1[1] == 0 && value1[0] == 0)
{
yaw = 270;
forward = sqrt(value1[0]*value1[0] + value1[1]*value1[1]);
- pitch = (int) (atan2(value1[2], forward) * 180 / M_PI);
+ pitch = (atan2(value1[2], forward) * 180 / M_PI);
if (pitch < 0)
pitch += 360;
}
- G_FLOAT(OFS_RETURN+0) = pitch;
- G_FLOAT(OFS_RETURN+1) = yaw;
- G_FLOAT(OFS_RETURN+2) = 0;
+ VectorSet(G_VECTOR(OFS_RETURN), pitch, yaw, 0);
}
/*
void PF_WriteAngle (void)
{
- if (sv.protocol == PROTOCOL_DARKPLACES5)
- MSG_WriteAngle16i (WriteDest(), G_FLOAT(OFS_PARM1));
- else
- MSG_WriteAngle8i (WriteDest(), G_FLOAT(OFS_PARM1));
+ MSG_WriteAngle (WriteDest(), G_FLOAT(OFS_PARM1), sv.protocol);
}
void PF_WriteCoord (void)
for (i=0 ; i<3 ; i++)
{
MSG_WriteCoord(&sv.signon, ent->v->origin[i], sv.protocol);
- MSG_WriteAngle8i(&sv.signon, ent->v->angles[i]);
+ MSG_WriteAngle(&sv.signon, ent->v->angles[i], sv.protocol);
}
// throw the entity away now
VectorMA(ambientcolor, 0.5, diffusecolor, G_VECTOR(OFS_RETURN));
}
-#define MAX_QC_CVARS 128
-cvar_t qc_cvar[MAX_QC_CVARS];
-int currentqc_cvar;
-
void PF_registercvar (void)
{
char *name, *value;
- cvar_t *variable;
name = G_STRING(OFS_PARM0);
value = G_STRING(OFS_PARM1);
G_FLOAT(OFS_RETURN) = 0;
+
// first check to see if it has already been defined
if (Cvar_FindVar (name))
return;
return;
}
- if (currentqc_cvar >= MAX_QC_CVARS)
- PF_ERROR("PF_registercvar: ran out of cvar slots\n");
-
-// copy the name and value
- variable = &qc_cvar[currentqc_cvar++];
- variable->name = Z_Malloc (strlen(name)+1);
- strcpy (variable->name, name);
- variable->string = Z_Malloc (strlen(value)+1);
- strcpy (variable->string, value);
- variable->value = atof (value);
+ Cvar_Get(name, value, 0);
- Cvar_RegisterVariable(variable);
G_FLOAT(OFS_RETURN) = 1; // success
}