summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorenneract <trem.redman@gmail.com>2014-02-26 01:13:41 +0100
committerenneract <trem.redman@gmail.com>2014-02-26 01:13:41 +0100
commitd67878e9c598d9cd92156c701e05b51c39f49e93 (patch)
treef2585a84a532480bfba7e00666356d5215dcb6cb /src/game/g_buildable.c
parent2e8851609620e0e45a8a26b53ae7f3ba898c63df (diff)
0.1.8
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 7c051bd..1faca0c 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -465,6 +465,9 @@ void G_ScanPowerGrid( gentity_t *this )
if( !next->active )
continue;
grid.sources[ grid.sourceCount++ ] = next;
+
+ next->powerNetwork = grid.networkID;
+ G_ScanPowerGrid( next );
}
else
grid.load[ grid.loadCount++ ] = next;
@@ -652,8 +655,8 @@ void G_UpdatePowerGrid( float dt )
ent->voltage -= ent->current * dt / CAPBANK_CAPACITY;
//zapping effect
- #define MIN_ZAP_CURRENT 8.0f
- #define ZAP_CHANCE_FACTOR 0.007f
+ #define MIN_ZAP_CURRENT 15.0f
+ #define ZAP_CHANCE_FACTOR 0.001f
if( ent->current > MIN_ZAP_CURRENT )
{
float chance;
@@ -3192,10 +3195,12 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
reason = IBE_NORMAL;
//the only buildable one can build on is a cuboid
+ /*
if( tr1.entityNum != ENTITYNUM_WORLD )
if( g_entities[ tr1.entityNum ].s.eType == ET_BUILDABLE &&
!BG_Buildable( g_entities[ tr1.entityNum ].s.modelindex, NULL )->cuboid )
reason = IBE_NORMAL;
+ */
contents = trap_PointContents( entity_origin, -1 );