physent-volume resize with collision detection for better crouching

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2838 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-10-05 12:50:44 +00:00
parent 7e5728a5ab
commit 1a8ad9e4d1
11 changed files with 78 additions and 63 deletions
+2 -4
View File
@@ -3,8 +3,6 @@
#include "pch.h"
#include "cube.h"
const int physent::crouchtime = 200;
vector<entity> ents;
const char *entnames[] =
@@ -188,7 +186,7 @@ void checkitems(playerent *d)
{
if(editmode || d->state!=CS_ALIVE) return;
d->onladder = false;
float eyeheight = d->dyneyeheight();
float eyeheight = d->eyeheight;
loopv(ents)
{
entity &e = ents[i];
@@ -388,7 +386,7 @@ void flagdropped(int flag, short x, short y, short z)
p.o.y = y;
p.o.z = z;
p.vel.z = -0.8f;
p.aboveeye = p.eyeheight = 0.4f;
p.aboveeye = p.eyeheight = p.maxeyeheight = 0.4f;
p.radius = 0.1f;
bool oldcancollide = false;