Quake 2 Oop Conversion Project - Source Diff 3.14 vs Ctf 1.02 - g_items.c
diff -s -r q2_314/g_items.c q2_314_ctf/g_items.c
Left File < - 3.14 : g_items.c
Right File > - Ctf 1.02 : g_items.c
Back to Index
110,111c110,118
< for (count = 0, ent = master; ent; ent = ent->chain, count++)
< ;
---
> //ZOID
> //in ctf, when we are weapons stay, only the master of a team of weapons
> //is spawned
> if (ctf->value &&
> ((int)dmflags->value & DF_WEAPONS_STAY) &&
> master->item && (master->item->flags & IT_WEAPON))
> ent = master;
> else {
> //ZOID
113c120,121
< choice = rand() % count;
---
> for (count = 0, ent = master; ent; ent = ent->chain, count++)
> ;
115,116c123,127
< for (count = 0, ent = master; count < choice; ent = ent->chain, count++)
< ;
---
> choice = rand() % count;
>
> for (count = 0, ent = master; count < choice; ent = ent->chain, count++)
> ;
> }
514c525,529
< if (self->owner->health > self->owner->max_health)
---
> if (self->owner->health > self->owner->max_health
> //ZOID
> && !CTFHasRegeneration(self->owner)
> //ZOID
> )
532a548,552
> //ZOID
> if (other->health >= 250 && ent->count > 25)
> return false;
> //ZOID
>
534a555,559
> //ZOID
> if (other->health > 250 && ent->count > 25)
> other->health = 250;
> //ZOID
>
550c575,579
< if (ent->style & HEALTH_TIMED)
---
> //ZOID
> if ((ent->style & HEALTH_TIMED)
> && !CTFHasRegeneration(other)
> //ZOID
> )
1088a1118,1127
> //ZOID
> //Don't spawn the flags unless enabled
> if (!ctf->value &&
> (strcmp(ent->classname, "item_flag_team1") == 0 ||
> strcmp(ent->classname, "item_flag_team2") == 0)) {
> G_FreeEdict(ent);
> return;
> }
> //ZOID
>
1095a1135,1143
>
> //ZOID
> //flags are server animated and have special handling
> if (strcmp(ent->classname, "item_flag_team1") == 0 ||
> strcmp(ent->classname, "item_flag_team2") == 0) {
> ent->think = CTFFlagSetup;
> }
> //ZOID
>
1247a1296,1318
> /* weapon_grapple (.3 .3 1) (-16 -16 -16) (16 16 16)
> always owned, never in the world
> */
> {
> "weapon_grapple",
> NULL,
> Use_Weapon,
> NULL,
> CTFWeapon_Grapple,
> "misc/w_pkup.wav",
> NULL, 0,
> "models/weapons/grapple/tris.md2",
> /* icon */ "w_grapple",
> /* pickup */ "Grapple",
> 0,
> 0,
> NULL,
> IT_WEAPON,
> NULL,
> 0,
> /* precache */ "weapons/grapple/grfire.wav weapons/grapple/grpull.wav weapons/grapple/grhang.wav weapons/grapple/grreset.wav weapons/grapple/grhit.wav"
> },
>
1270a1342
>
1290c1362
< /* precache */ "weapons/shotgf1b.wav weapons/shotgr1b.wav"
---
> /* precache */ "weapons/v_shotg/flash2/tris.md2 weapons/shotgf1b.wav weapons/shotgr1b.wav"
1490a1563,1587
> #if 0
> //ZOID
> /*QUAKED weapon_laser (.3 .3 1) (-16 -16 -16) (16 16 16)
> */
> {
> "weapon_laser",
> Pickup_Weapon,
> Use_Weapon,
> Drop_Weapon,
> Weapon_Laser,
> "misc/w_pkup.wav",
> "models/weapons/g_laser/tris.md2", EF_ROTATE,
> "models/weapons/v_laser/tris.md2",
> /* icon */ "w_bfg",
> /* pickup */ "Flashlight Laser",
> 0,
> 1,
> "Cells",
> IT_WEAPON,
> NULL,
> 0,
> /* precache */ ""
> },
> #endif
>
2037a2135,2266
>
>
> //ZOID
> /*QUAKED item_flag_team1 (1 0.2 0) (-16 -16 -24) (16 16 32)
> */
> {
> "item_flag_team1",
> CTFPickup_Flag,
> NULL,
> CTFDrop_Flag, //Should this be null if we don't want players to drop it manually?
> NULL,
> "ctf/flagtk.wav",
> "players/male/flag1.md2", EF_FLAG1,
> NULL,
> /* icon */ "i_ctf1",
> /* pickup */ "Red Flag",
> /* width */ 2,
> 0,
> NULL,
> 0,
> NULL,
> 0,
> /* precache */ "ctf/flagcap.wav"
> },
>
> /*QUAKED item_flag_team2 (1 0.2 0) (-16 -16 -24) (16 16 32)
> */
> {
> "item_flag_team2",
> CTFPickup_Flag,
> NULL,
> CTFDrop_Flag, //Should this be null if we don't want players to drop it manually?
> NULL,
> "ctf/flagtk.wav",
> "players/male/flag2.md2", EF_FLAG2,
> NULL,
> /* icon */ "i_ctf2",
> /* pickup */ "Blue Flag",
> /* width */ 2,
> 0,
> NULL,
> 0,
> NULL,
> 0,
> /* precache */ "ctf/flagcap.wav"
> },
>
> /* Resistance Tech */
> {
> "item_tech1",
> CTFPickup_Tech,
> NULL,
> CTFDrop_Tech, //Should this be null if we don't want players to drop it manually?
> NULL,
> "items/pkup.wav",
> "models/ctf/resistance/tris.md2", EF_ROTATE,
> NULL,
> /* icon */ "tech1",
> /* pickup */ "Disruptor Shield",
> /* width */ 2,
> 0,
> NULL,
> IT_TECH,
> NULL,
> 0,
> /* precache */ "ctf/tech1.wav"
> },
>
> /* Strength Tech */
> {
> "item_tech2",
> CTFPickup_Tech,
> NULL,
> CTFDrop_Tech, //Should this be null if we don't want players to drop it manually?
> NULL,
> "items/pkup.wav",
> "models/ctf/strength/tris.md2", EF_ROTATE,
> NULL,
> /* icon */ "tech2",
> /* pickup */ "Power Amplifier",
> /* width */ 2,
> 0,
> NULL,
> IT_TECH,
> NULL,
> 0,
> /* precache */ "ctf/tech2.wav ctf/tech2x.wav"
> },
>
> /* Haste Tech */
> {
> "item_tech3",
> CTFPickup_Tech,
> NULL,
> CTFDrop_Tech, //Should this be null if we don't want players to drop it manually?
> NULL,
> "items/pkup.wav",
> "models/ctf/haste/tris.md2", EF_ROTATE,
> NULL,
> /* icon */ "tech3",
> /* pickup */ "Time Accel",
> /* width */ 2,
> 0,
> NULL,
> IT_TECH,
> NULL,
> 0,
> /* precache */ "ctf/tech3.wav"
> },
>
> /* Regeneration Tech */
> {
> "item_tech4",
> CTFPickup_Tech,
> NULL,
> CTFDrop_Tech, //Should this be null if we don't want players to drop it manually?
> NULL,
> "items/pkup.wav",
> "models/ctf/regeneration/tris.md2", EF_ROTATE,
> NULL,
> /* icon */ "tech4",
> /* pickup */ "AutoDoc",
> /* width */ 2,
> 0,
> NULL,
> IT_TECH,
> NULL,
> 0,
> /* precache */ "ctf/tech4.wav"
> },
>
> //ZOID