Fix needing -fpermissive
FossilOrigin-Name: bd82b5a5b17fdeacf6b3133104b958a1597e5e16379280cf0bcfef7e7fef1468
This commit is contained in:
parent
ea315c4a21
commit
04fa50a332
11 changed files with 20 additions and 18 deletions
|
@ -42,7 +42,6 @@ CPPFLAGS += -I../enet/include \
|
||||||
${GLU_CFLAGS} \
|
${GLU_CFLAGS} \
|
||||||
${X11_CFLAGS} \
|
${X11_CFLAGS} \
|
||||||
${ZLIB_CFLAGS}
|
${ZLIB_CFLAGS}
|
||||||
CXXFLAGS += -fpermissive
|
|
||||||
LIBS += -L../enet -lenet \
|
LIBS += -L../enet -lenet \
|
||||||
${SDL_LIBS} \
|
${SDL_LIBS} \
|
||||||
${GL_LIBS} \
|
${GL_LIBS} \
|
||||||
|
|
|
@ -18,14 +18,14 @@ renderclient(dynent *d, bool team, char *mdlname, bool hellpig, float scale)
|
||||||
int n = 3;
|
int n = 3;
|
||||||
float speed = 100.0f;
|
float speed = 100.0f;
|
||||||
float mz = d->o.z - d->eyeheight + 1.55f * scale;
|
float mz = d->o.z - d->eyeheight + 1.55f * scale;
|
||||||
int basetime = -((int)d & 0xFFF);
|
int basetime = -((intptr_t)d & 0xFFF);
|
||||||
if (d->state == CS_DEAD) {
|
if (d->state == CS_DEAD) {
|
||||||
int r;
|
int r;
|
||||||
if (hellpig) {
|
if (hellpig) {
|
||||||
n = 2;
|
n = 2;
|
||||||
r = range[3];
|
r = range[3];
|
||||||
} else {
|
} else {
|
||||||
n = (int)d % 3;
|
n = (intptr_t)d % 3;
|
||||||
r = range[n];
|
r = range[n];
|
||||||
};
|
};
|
||||||
basetime = d->lastaction;
|
basetime = d->lastaction;
|
||||||
|
|
|
@ -273,7 +273,8 @@ localservertoclient(
|
||||||
setspawn(i, true);
|
setspawn(i, true);
|
||||||
if (i >= (uint)ents.length())
|
if (i >= (uint)ents.length())
|
||||||
break;
|
break;
|
||||||
vec v = {ents[i].x, ents[i].y, ents[i].z};
|
vec v = {(float)ents[i].x, (float)ents[i].y,
|
||||||
|
(float)ents[i].z};
|
||||||
playsound(S_ITEMSPAWN, &v);
|
playsound(S_ITEMSPAWN, &v);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
|
@ -247,7 +247,7 @@ keypress(int code, bool isdown, int cooked)
|
||||||
default:
|
default:
|
||||||
resetcomplete();
|
resetcomplete();
|
||||||
if (cooked) {
|
if (cooked) {
|
||||||
char add[] = {cooked, 0};
|
char add[] = {(char)cooked, 0};
|
||||||
strcat_s(commandbuf, add);
|
strcat_s(commandbuf, add);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -317,7 +317,8 @@ checkitems()
|
||||||
continue;
|
continue;
|
||||||
if (OUTBORD(e.x, e.y))
|
if (OUTBORD(e.x, e.y))
|
||||||
continue;
|
continue;
|
||||||
vec v = {e.x, e.y, S(e.x, e.y)->floor + player1->eyeheight};
|
vec v = {(float)e.x, (float)e.y,
|
||||||
|
(float)S(e.x, e.y)->floor + player1->eyeheight};
|
||||||
vdist(dist, t, player1->o, v);
|
vdist(dist, t, player1->o, v);
|
||||||
if (dist < (e.type == TELEPORT ? 4 : 2.5))
|
if (dist < (e.type == TELEPORT ? 4 : 2.5))
|
||||||
pickup(i, player1);
|
pickup(i, player1);
|
||||||
|
|
|
@ -378,7 +378,7 @@ monsterthink()
|
||||||
continue;
|
continue;
|
||||||
if (OUTBORD(e.x, e.y))
|
if (OUTBORD(e.x, e.y))
|
||||||
continue;
|
continue;
|
||||||
vec v = {e.x, e.y, S(e.x, e.y)->floor};
|
vec v = {(float)e.x, (float)e.y, (float)S(e.x, e.y)->floor};
|
||||||
loopv(monsters) if (monsters[i]->state == CS_DEAD)
|
loopv(monsters) if (monsters[i]->state == CS_DEAD)
|
||||||
{
|
{
|
||||||
if (lastmillis - monsters[i]->lastaction < 2000) {
|
if (lastmillis - monsters[i]->lastaction < 2000) {
|
||||||
|
|
|
@ -184,7 +184,7 @@ renderents() // show sparkly thingies for map entities in edit mode
|
||||||
entity &e = ents[i];
|
entity &e = ents[i];
|
||||||
if (e.type == NOTUSED)
|
if (e.type == NOTUSED)
|
||||||
continue;
|
continue;
|
||||||
vec v = {e.x, e.y, e.z};
|
vec v = {(float)e.x, (float)e.y, (float)e.z};
|
||||||
particle_splash(2, 2, 40, v);
|
particle_splash(2, 2, 40, v);
|
||||||
};
|
};
|
||||||
int e = closestent();
|
int e = closestent();
|
||||||
|
|
|
@ -460,18 +460,18 @@ serverslice(int seconds,
|
||||||
}
|
}
|
||||||
case ENET_EVENT_TYPE_RECEIVE:
|
case ENET_EVENT_TYPE_RECEIVE:
|
||||||
brec += event.packet->dataLength;
|
brec += event.packet->dataLength;
|
||||||
process(event.packet, (int)event.peer->data);
|
process(event.packet, (intptr_t)event.peer->data);
|
||||||
if (event.packet->referenceCount == 0)
|
if (event.packet->referenceCount == 0)
|
||||||
enet_packet_destroy(event.packet);
|
enet_packet_destroy(event.packet);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ENET_EVENT_TYPE_DISCONNECT:
|
case ENET_EVENT_TYPE_DISCONNECT:
|
||||||
if ((int)event.peer->data < 0)
|
if ((intptr_t)event.peer->data < 0)
|
||||||
break;
|
break;
|
||||||
printf("disconnected client (%s)\n",
|
printf("disconnected client (%s)\n",
|
||||||
clients[(int)event.peer->data].hostname);
|
clients[(intptr_t)event.peer->data].hostname);
|
||||||
clients[(int)event.peer->data].type = ST_EMPTY;
|
clients[(intptr_t)event.peer->data].type = ST_EMPTY;
|
||||||
send2(true, -1, SV_CDIS, (int)event.peer->data);
|
send2(true, -1, SV_CDIS, (intptr_t)event.peer->data);
|
||||||
event.peer->data = (void *)-1;
|
event.peer->data = (void *)-1;
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
|
@ -256,7 +256,7 @@ closestent() // used for delent and edit mode ent display
|
||||||
entity &e = ents[i];
|
entity &e = ents[i];
|
||||||
if (e.type == NOTUSED)
|
if (e.type == NOTUSED)
|
||||||
continue;
|
continue;
|
||||||
vec v = {e.x, e.y, e.z};
|
vec v = {(float)e.x, (float)e.y, (float)e.z};
|
||||||
vdist(dist, t, player1->o, v);
|
vdist(dist, t, player1->o, v);
|
||||||
if (dist < bdist) {
|
if (dist < bdist) {
|
||||||
best = i;
|
best = i;
|
||||||
|
@ -316,7 +316,8 @@ entity *
|
||||||
newentity(int x, int y, int z, char *what, int v1, int v2, int v3, int v4)
|
newentity(int x, int y, int z, char *what, int v1, int v2, int v3, int v4)
|
||||||
{
|
{
|
||||||
int type = findtype(what);
|
int type = findtype(what);
|
||||||
persistent_entity e = {x, y, z, v1, type, v2, v3, v4};
|
persistent_entity e = {(short)x, (short)y, (short)z, (short)v1,
|
||||||
|
(uchar)type, (uchar)v2, (uchar)v3, (uchar)v4};
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case LIGHT:
|
case LIGHT:
|
||||||
if (v1 > 32)
|
if (v1 > 32)
|
||||||
|
|
|
@ -226,8 +226,8 @@ dodynlight(vec &vold, vec &v, int reach, int strength, dynent *owner)
|
||||||
|
|
||||||
dlights.add(blockcopy(b)); // backup area before rendering in dynlight
|
dlights.add(blockcopy(b)); // backup area before rendering in dynlight
|
||||||
|
|
||||||
persistent_entity l = {
|
persistent_entity l = {(short)v.x, (short)v.y, (short)v.z, (short)reach,
|
||||||
(int)v.x, (int)v.y, (int)v.z, reach, LIGHT, strength, 0, 0};
|
LIGHT, (uchar)strength, 0, 0};
|
||||||
calclightsource(l);
|
calclightsource(l);
|
||||||
postlightarea(b);
|
postlightarea(b);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue