diff --git a/Source/server/scihunt/client.c b/Source/server/scihunt/client.c index 68eb9504..3fb74a31 100644 --- a/Source/server/scihunt/client.c +++ b/Source/server/scihunt/client.c @@ -121,12 +121,7 @@ void Game_PutClientInServer(void) pl.angles = spot.angles; pl.fixangle = TRUE; - pl.ammo_9mm = 68; - pl.ammo_buckshot = 34; - Weapons_AddItem(pl, WEAPON_CROWBAR); - Weapons_AddItem(pl, WEAPON_GLOCK); - Weapons_AddItem(pl, WEAPON_CANNON); - Weapons_AddItem(pl, WEAPON_CHAINSAW); + SHData_GetItems(); } } diff --git a/Source/server/scihunt/input.c b/Source/server/scihunt/input.c index 96fa0c65..e0f5f4e8 100644 --- a/Source/server/scihunt/input.c +++ b/Source/server/scihunt/input.c @@ -37,27 +37,7 @@ void Game_Input(void) if (cvar("sv_cheats") == 1) { player pl = (player)self; - if (self.impulse == 101) { - Weapons_AddItem(pl, WEAPON_CROWBAR); - Weapons_AddItem(pl, WEAPON_GLOCK); - Weapons_AddItem(pl, WEAPON_PYTHON); - Weapons_AddItem(pl, WEAPON_MP5); - Weapons_AddItem(pl, WEAPON_SHOTGUN); - Weapons_AddItem(pl, WEAPON_CROSSBOW); - Weapons_AddItem(pl, WEAPON_RPG); - Weapons_AddItem(pl, WEAPON_GAUSS); - Weapons_AddItem(pl, WEAPON_EGON); - Weapons_AddItem(pl, WEAPON_HORNETGUN); - Weapons_AddItem(pl, WEAPON_HANDGRENADE); - Weapons_AddItem(pl, WEAPON_SATCHEL); - Weapons_AddItem(pl, WEAPON_TRIPMINE); - Weapons_AddItem(pl, WEAPON_SNARK); - Weapons_AddItem(pl, WEAPON_CANNON); - Weapons_AddItem(pl, WEAPON_CHAINSAW); - Weapons_AddItem(pl, WEAPON_HAMMER); - Weapons_AddItem(pl, AMMO_BUCKSHOT); - } - + if (self.impulse == 102) { // Respawn all the entities for (entity a = world; (a = findfloat(a, gflags, GF_CANRESPAWN));) { diff --git a/Source/server/scihunt/shdata_parse.c b/Source/server/scihunt/shdata_parse.c index 199850f0..68174e50 100644 --- a/Source/server/scihunt/shdata_parse.c +++ b/Source/server/scihunt/shdata_parse.c @@ -6,6 +6,8 @@ * ****/ +string g_shItemList; + void SHData_New(void) { entity new = spawn(); @@ -51,6 +53,32 @@ void SHData_NewAngles(void) self = oldself; } +void SHData_GetItems(void) +{ + player pl = (player)self; + + /* TODO: Parse the config files */ + pl.ammo_9mm = 68; + pl.ammo_buckshot = 34; + Weapons_AddItem(pl, WEAPON_CROWBAR); + Weapons_AddItem(pl, WEAPON_GLOCK); + Weapons_AddItem(pl, WEAPON_PYTHON); + Weapons_AddItem(pl, WEAPON_MP5); + Weapons_AddItem(pl, WEAPON_SHOTGUN); + Weapons_AddItem(pl, WEAPON_CROSSBOW); + Weapons_AddItem(pl, WEAPON_RPG); + Weapons_AddItem(pl, WEAPON_GAUSS); + Weapons_AddItem(pl, WEAPON_EGON); + Weapons_AddItem(pl, WEAPON_HORNETGUN); + Weapons_AddItem(pl, WEAPON_HANDGRENADE); + Weapons_AddItem(pl, WEAPON_SATCHEL); + Weapons_AddItem(pl, WEAPON_TRIPMINE); + Weapons_AddItem(pl, WEAPON_SNARK); + Weapons_AddItem(pl, WEAPON_CANNON); + Weapons_AddItem(pl, WEAPON_CHAINSAW); + Weapons_AddItem(pl, WEAPON_HAMMER); +} + void SHData_Parse(string map) { int c; diff --git a/Source/shared/scihunt/w_chainsaw.c b/Source/shared/scihunt/w_chainsaw.c index 35fdab39..35c76398 100644 --- a/Source/shared/scihunt/w_chainsaw.c +++ b/Source/shared/scihunt/w_chainsaw.c @@ -84,6 +84,11 @@ void w_chainsaw_primary(void) Effect_Impact(IMPACT_MELEE, trace_endpos, trace_plane_normal); if (trace_ent.takedamage) { + if (trace_ent.iBleeds) { + /* Push the player towards the victim */ + pl.velocity = normalize(trace_ent.origin - pl.origin) * 240; + } + Damage_Apply(trace_ent, self, 10, trace_endpos, FALSE ); Weapons_PlaySound(pl, CHAN_WEAPON, "sh/chainsaw_cutintoflesh.wav", 1, ATTN_NORM); } else { diff --git a/scihunt/csprogs.dat b/scihunt/csprogs.dat new file mode 100644 index 00000000..142e0fff Binary files /dev/null and b/scihunt/csprogs.dat differ