mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Fix more gcc 4.8 errors.
More actual bugs found, too.
This commit is contained in:
parent
03fb47d7ba
commit
6288684fa2
6 changed files with 27 additions and 15 deletions
|
@ -45,6 +45,8 @@
|
|||
|
||||
#include "rua_internal.h"
|
||||
|
||||
#define always_inline inline __attribute__((__always_inline__))
|
||||
|
||||
typedef struct bi_plist_s {
|
||||
struct bi_plist_s *next;
|
||||
struct bi_plist_s **prev;
|
||||
|
@ -140,7 +142,7 @@ plist_free_handle (plist_resources_t *res, bi_plist_t *plist)
|
|||
plist_free (res, plist);
|
||||
}
|
||||
|
||||
static inline bi_plist_t *
|
||||
static always_inline bi_plist_t *
|
||||
get_plist (progs_t *pr, const char *name, int handle)
|
||||
{
|
||||
plist_resources_t *res = PR_Resources_Find (pr, "plist");
|
||||
|
|
|
@ -1185,8 +1185,12 @@ R_EntityParticles_ID (const entity_t *ent)
|
|||
}
|
||||
|
||||
if (!avelocities[0][0]) {
|
||||
for (i = 0; i < NUMVERTEXNORMALS * 3; i++)
|
||||
avelocities[0][i] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
int k;
|
||||
for (k = 0; k < 3; k++) {
|
||||
avelocities[i][k] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < j; i++) {
|
||||
|
|
|
@ -1271,9 +1271,11 @@ R_EntityParticles_ID (const entity_t *ent)
|
|||
j = r_maxparticles - numparticles;
|
||||
}
|
||||
|
||||
if (!avelocities[0][0]) {
|
||||
for (i = 0; i < NUMVERTEXNORMALS * 3; i++)
|
||||
avelocities[0][i] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
int k;
|
||||
for (k = 0; k < 3; k++) {
|
||||
avelocities[i][k] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < j; i++) {
|
||||
|
|
|
@ -435,9 +435,11 @@ R_EntityParticles_ID (const entity_t *ent)
|
|||
if (!r_particles->int_val)
|
||||
return;
|
||||
|
||||
if (!avelocities[0][0]) {
|
||||
for (i = 0; i < NUMVERTEXNORMALS * 3; i++)
|
||||
avelocities[0][i] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
int k;
|
||||
for (k = 0; k < 3; k++) {
|
||||
avelocities[i][k] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
|
|
|
@ -377,9 +377,11 @@ R_EntityParticles_ID (const entity_t *ent)
|
|||
particle_t *p;
|
||||
vec3_t forward;
|
||||
|
||||
if (!avelocities[0][0]) {
|
||||
for (i = 0; i < NUMVERTEXNORMALS * 3; i++)
|
||||
avelocities[0][i] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
int k;
|
||||
for (k = 0; k < 3; k++) {
|
||||
avelocities[i][k] = (mtwist_rand (&mt) & 255) * 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < NUMVERTEXNORMALS; i++) {
|
||||
|
|
|
@ -818,10 +818,10 @@ cpqw_user_cmd (void)
|
|||
|
||||
PR_PushFrame (pr);
|
||||
P_FLOAT (pr, 0) = argc;
|
||||
for (i = 0; i < argc; i++)
|
||||
P_STRING (pr, i + 1) = PR_SetTempString (pr, Cmd_Argv (i));
|
||||
for (i = 1; i < argc; i++)
|
||||
P_STRING (pr, i) = PR_SetTempString (pr, Cmd_Argv (i - 1));
|
||||
for (; i < 7; i++)
|
||||
P_STRING (pr, i + 1) = 0;
|
||||
P_STRING (pr, i) = 0;
|
||||
PR_ExecuteProgram (pr, cpqw_funcs.ClientCommand);
|
||||
PR_PopFrame (pr);
|
||||
return (int) R_FLOAT (pr);
|
||||
|
|
Loading…
Reference in a new issue