1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// physics.cpp: no physics books were hurt nor consulted in the construction of
// this code. All physics computations and constants were invented on the fly
// and simply tweaked until they "felt right", and have no basis in reality.
// Collision detection is simplistic but very robust (uses discrete steps at
// fixed fps).
#include "cube.h"
bool
plcollide(dynent *d, dynent *o, float &headspace, float &hi,
float &lo) // collide with player or monster
{
if (o->state != CS_ALIVE)
return true;
|
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// physics.cpp: no physics books were hurt nor consulted in the construction of
// this code. All physics computations and constants were invented on the fly
// and simply tweaked until they "felt right", and have no basis in reality.
// Collision detection is simplistic but very robust (uses discrete steps at
// fixed fps).
#include "cube.h"
#import "MapModelInfo.h"
bool
plcollide(dynent *d, dynent *o, float &headspace, float &hi,
float &lo) // collide with player or monster
{
if (o->state != CS_ALIVE)
return true;
|