summaryrefslogtreecommitdiff
path: root/src/fpsgame
diff options
context:
space:
mode:
authorxolatile2025-08-05 01:05:35 +0200
committerxolatile2025-08-05 01:05:35 +0200
commit6762e292d02e37a69a807e01493d4e14319cca33 (patch)
tree6be0e9914ababfe279644172f6eee9c2d0de9ef5 /src/fpsgame
parentd309df4ce4d8ad0ed995a8e1c4267412a7782021 (diff)
downloadxolatile-badassbug-6762e292d02e37a69a807e01493d4e14319cca33.tar.xz
xolatile-badassbug-6762e292d02e37a69a807e01493d4e14319cca33.tar.zst
Do not compile, deleting stuff...
Diffstat (limited to 'src/fpsgame')
-rw-r--r--src/fpsgame/ai.cpp4
-rw-r--r--src/fpsgame/entities.cpp16
-rw-r--r--src/fpsgame/fps.cpp2
-rw-r--r--src/fpsgame/game.h2
-rw-r--r--src/fpsgame/waypoint.cpp2
5 files changed, 3 insertions, 23 deletions
diff --git a/src/fpsgame/ai.cpp b/src/fpsgame/ai.cpp
index 60b33ca..c57b575 100644
--- a/src/fpsgame/ai.cpp
+++ b/src/fpsgame/ai.cpp
@@ -1,7 +1,5 @@
#include "game.h"
-extern int fog;
-
namespace ai
{
using namespace game;
@@ -20,7 +18,7 @@ namespace ai
float viewdist(int x)
{
- return x <= 100 ? clamp((SIGHTMIN+(SIGHTMAX-SIGHTMIN))/100.f*float(x), float(SIGHTMIN), float(fog)) : float(fog);
+ return x <= 100 ? clamp((SIGHTMIN+(SIGHTMAX-SIGHTMIN))/100.f*float(x), float(SIGHTMIN), float(fog)) : 10000.0f;
}
float viewfieldx(int x)
diff --git a/src/fpsgame/entities.cpp b/src/fpsgame/entities.cpp
index dc0e175..93e3dc9 100644
--- a/src/fpsgame/entities.cpp
+++ b/src/fpsgame/entities.cpp
@@ -8,20 +8,6 @@ namespace entities
int extraentinfosize() { return 0; } // size in bytes of what the 2 methods below read/write... so it can be skipped by other games
- void writeent(entity &e, char *buf) // write any additional data to disk (except for ET_ ents)
- {
- }
-
- void readent(entity &e, char *buf, int ver) // read from disk, and init
- {
- if(ver <= 30) switch(e.type)
- {
- case TELEDEST:
- e.attr1 = (int(e.attr1)+180)%360;
- break;
- }
- }
-
#ifndef STANDALONE
vector<extentity *> ents;
@@ -439,7 +425,7 @@ namespace entities
{
static const char * const entnames[] =
{
- "none?", "light", "mapmodel", "playerstart", "envmap", "particles", "sound", "spotlight",
+ "none?", "light", "mapmodel", "playerstart", "none?", "particles", "sound", "spotlight",
"shells", "bullets", "rockets", "riflerounds", "grenades", "cartridges",
"health", "healthboost", "tinyhealth", "tinyarmour", "greenarmour", "yellowarmour", "quaddamage",
"teleport", "teledest",
diff --git a/src/fpsgame/fps.cpp b/src/fpsgame/fps.cpp
index fde58e8..bcbad2b 100644
--- a/src/fpsgame/fps.cpp
+++ b/src/fpsgame/fps.cpp
@@ -646,8 +646,6 @@ namespace game
void physicstrigger(physent *d, bool local, int floorlevel, int waterlevel, int material)
{
if(d->type==ENT_INANIMATE) return;
- if (waterlevel>0) { if(material!=MAT_LAVA) playsound(S_SPLASH1, d==player1 ? NULL : &d->o); }
- else if(waterlevel<0) playsound(material==MAT_LAVA ? S_BURN : S_SPLASH2, d==player1 ? NULL : &d->o);
if (floorlevel>0) { if(d==player1 || d->type!=ENT_PLAYER || ((fpsent *)d)->ai) msgsound(S_JUMP, d); }
else if(floorlevel<0) { if(d==player1 || d->type!=ENT_PLAYER || ((fpsent *)d)->ai) msgsound(S_LAND, d); }
}
diff --git a/src/fpsgame/game.h b/src/fpsgame/game.h
index 0495502..c37f616 100644
--- a/src/fpsgame/game.h
+++ b/src/fpsgame/game.h
@@ -26,7 +26,7 @@ enum // static entity types
LIGHT = ET_LIGHT, // lightsource, attr1 = radius, attr2 = intensity
MAPMODEL = ET_MAPMODEL, // attr1 = angle, attr2 = idx
PLAYERSTART, // attr1 = angle, attr2 = team
- ENVMAP = ET_ENVMAP, // attr1 = radius
+ ENVMAP = ET_NOENVMAP, // attr1 = radius
PARTICLES = ET_PARTICLES,
MAPSOUND = ET_SOUND,
SPOTLIGHT = ET_SPOTLIGHT,
diff --git a/src/fpsgame/waypoint.cpp b/src/fpsgame/waypoint.cpp
index c6025c5..8d97782 100644
--- a/src/fpsgame/waypoint.cpp
+++ b/src/fpsgame/waypoint.cpp
@@ -20,14 +20,12 @@ namespace ai
if(!insideworld(vec(pos.x, pos.y, min(pos.z, getworldsize() - 1e-3f)))) return -2;
float dist = raycube(pos, vec(0, 0, -1), 0, RAY_CLIPMAT);
int posmat = lookupmaterial(pos), weight = 1;
- if(isliquid(posmat&MATF_VOLUME)) weight *= 5;
if(dist >= 0)
{
weight = int(dist/ai::JUMPMIN);
pos.z -= clamp(dist-8.0f, 0.0f, pos.z);
int trgmat = lookupmaterial(pos);
if(trgmat&MAT_DEATH || (trgmat&MATF_VOLUME) == MAT_LAVA) weight *= 10;
- else if(isliquid(trgmat&MATF_VOLUME)) weight *= 2;
}
return weight;
}