Skip to content

Commit

Permalink
you can pick up and put the crate down now with HookAxe swing
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-hopoo committed Jul 18, 2023
1 parent 4ae01ee commit 4fa55e7
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 136 deletions.
136 changes: 5 additions & 131 deletions conhistory.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
Expand All @@ -52,121 +11,36 @@ map start
impulse 9
map start
impulse 9
game testmod
map start
impulse 9
impulse 9
cheats
game testmod
map start
impulse 9
impulse 9
game testmod
map start
impulse 9
help
impulse 8
impulse 7
impulse 9
impulse 10
noclip
serverinfo
/sv_progtype
/sv_cheats 1
map start
impulse 9
sv_cheats
noclip
noclip
impulse
mlook
+mlook
impulse 9
impulse 10
impulse 10
impulse 10
impulse 5
/give
give grenadelauncher
give 10
/give help
weapon 9
weapon 1
/impulse 9
impulse 9
game testmod
map start
impulse 9
map start
impulse 9

+mlook
map start
+mlook
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
chase_active 1
chase_active 0
chase_active 0
map start
impulse 9
map start
impulse 9
game testmod
map start
impulse 9
map start
impulse 9
game testmod
map start
impulse 9
impulse 9
map start
impulse 9
game testmod
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
game testmod
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
map start
impulse 9
impulse 9
map start
map start
impulse 9
sv
/sv_gamedir
/sv_listen_dp
/sv_listen_dp 1
/sv_listen_dp
/sv_addport
/sv_serverip
sv_cheats 1
noclip
map e1m1
noclip
noclip
noclip
noclip
7 changes: 5 additions & 2 deletions testmod/bizzBounceBomb.qc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
// remove(self);
// };

void() AutoSwitchToCratesOnAxeHit =
void(entity struckCrate) AutoSwitchToCratesOnAxeHit =
{
remove(struckCrate);
self.ammo_crates_real = 1;
W_UpdateAmmoCounts(self);
self.weapon = IT_CRATES;
self.weaponmodel = "progs/v_holdbox.mdl";
self.items = self.items | IT_CRATES;
self.ammo_type = AT_CRATES;
self.weaponframe = 0;
};

void() WaitForPlayerExit =
Expand Down Expand Up @@ -291,7 +295,6 @@ void() W_FireBounceBomb =
{
self.ammo_crates_real -= 1;
W_UpdateAmmoCounts(self);
dprint(ftos(self.ammo_crates_real));
}

sound (self, CHAN_WEAPON, "weapons/grenade.wav", 1, ATTN_NORM);
Expand Down
7 changes: 7 additions & 0 deletions testmod/bizzHookAxe.qc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ void() W_HookAxe =
else
T_Damage (trace_ent, self, self, 20, MOD_AXE);
}
else if (trace_ent.classname == "bizzCrate")
{
sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
TE_gunshot(org);
AutoSwitchToCratesOnAxeHit(trace_ent);
return;
}
else
{ // hit wall
sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
Expand Down
2 changes: 1 addition & 1 deletion testmod/progs.src
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include "combat.qc"
#include "items.qc"
#include "proj.qc"
#include "bizzHookAxe.qc"
#include "bizzBounceBomb.qc"
#include "bizzHookAxe.qc"
#include "weapons.qc"
#include "world.qc"
#include "client.qc"
Expand Down
Binary file modified testmod/qwprogs.dat
Binary file not shown.
Binary file modified testmod/qwprogs.lno
Binary file not shown.
8 changes: 6 additions & 2 deletions testmod/weapons.qc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ void(entity ent) W_UpdateAmmoCounts =
ent.ammo_nails = ent.ammo_nails_real;
ent.ammo_rockets = ent.ammo_rockets_real;
ent.ammo_cells = ent.ammo_cells_real;
ent.AMMO_CRATES = ent.ammo_crates_real;
};

/*
Expand Down Expand Up @@ -659,8 +660,11 @@ float() W_BestWeapon =
{
// BIZZ - there may be a bug here related to wanting to auto-switch to crates while underwater instead of Lightning gun or whatever...?
float fl;

if (self.waterlevel <= 1)
if (self.ammo_crates_real >= 1)
{
fl = IT_CRATES;
}
else if (self.waterlevel <= 1)
fl = IT_LIGHTNING;
else
fl = IT_SUPER_NAILGUN;
Expand Down

0 comments on commit 4fa55e7

Please sign in to comment.