mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 07:11:51 +00:00
Dropitems works again! We thought the flag was in goal_result but it's in
goal_activation. Hahe. Also, infokey "ad" or "always_drop" set to "yes" "on" or "1" makes dropitems always work.
This commit is contained in:
parent
06921195fa
commit
78f0a0474e
4 changed files with 12 additions and 4 deletions
10
actions.qc
10
actions.qc
|
@ -705,12 +705,20 @@ void() TeamFortress_DropItems =
|
|||
{
|
||||
local entity tg;
|
||||
|
||||
local string st = infokey(NIL, "ad");
|
||||
local float always = FALSE;
|
||||
|
||||
if (!st)
|
||||
st = infokey(NIL, "always_drop");
|
||||
if (st == "on" || st == "yes" || st == "1")
|
||||
always = TRUE;
|
||||
|
||||
tg = find (NIL, classname, "item_tfgoal");
|
||||
while (tg)
|
||||
{
|
||||
if (tg.owner == self && tg && tg.classname == "item_tfgoal")
|
||||
{
|
||||
if (tg.goal_result & TFGR_DROPITEMS)
|
||||
if ((tg.goal_activation & TFGI_DROPITEMS) || always)
|
||||
{
|
||||
sprint (self, PRINT_HIGH, "Dropping item: ");
|
||||
sprint (self, PRINT_HIGH, tg.netname);
|
||||
|
|
2
defs.qh
2
defs.qh
|
@ -1169,7 +1169,6 @@
|
|||
#define TFGR_NO_ITEM_RESULTS 8 // GoalItems given by this Goal don't do results
|
||||
#define TFGR_REMOVE_DISGUISE 16 // Prevent/Remove undercover from any Spy
|
||||
#define TFGR_CAUSERESPAWN 32 //CH force respawn, not die
|
||||
#define TFGR_DROPITEMS 4096 //CH allows user to drop item with "dropitems"
|
||||
|
||||
// Defines for Goal Group Result types : goal_group
|
||||
// None!
|
||||
|
@ -1189,6 +1188,7 @@
|
|||
#define TFGI_ITEMGLOWS 512 // Item glows when on the ground
|
||||
#define TFGI_DONTREMOVERES 1024 // Don't remove results when the item is removed
|
||||
#define TFGI_GOAL_TO_GROUND 2048 //CH GoalItem drops to ground when spawns
|
||||
#define TFGI_DROPITEMS 4096 //GR TF docs mislabel this as being in goal_results, ha ha!
|
||||
#define TFGI_GOAL_IS_SOLID 8192 //CH GoalItem is solid
|
||||
|
||||
// Defines for TeamSpawnpoints : goal_activation (in teamspawns)
|
||||
|
|
|
@ -310,7 +310,7 @@ void () Alias_SetBatch =
|
|||
//Get rid of silly MegaTF 10 year olds
|
||||
TeamFortress_Alias("lay", TF_LAY, 0);
|
||||
//CH allow dropitems
|
||||
//TeamFortress_Alias("dropitems", TF_DROPITEMS, 0);
|
||||
TeamFortress_Alias("dropitems", TF_DROPITEMS, 0);
|
||||
} else if (num == 15) {
|
||||
} else if (num == 16) {
|
||||
#ifdef STATUSBAR
|
||||
|
|
|
@ -3219,7 +3219,7 @@ void(entity Item) tfgoalitem_drop =
|
|||
|
||||
if (Item.mdl)
|
||||
setmodel(Item, Item.mdl);
|
||||
if (Item.goal_result & TFGR_DROPITEMS) //checks for dropitems
|
||||
if (Item.goal_activation & TFGI_DROPITEMS) //checks for dropitems
|
||||
{
|
||||
Item.nextthink = time + 1; //CH wait a sec then make it pickupable
|
||||
Item.think = tfgoalitem_settouchandthink;
|
||||
|
|
Loading…
Reference in a new issue