ChaosDM source

Discussion for the original Quake 2 Chaos. (DM & CTF)
Post Reply
Paril
Posts: 4
Joined: Thu Apr 20, 2006 1:04 am
Contact:

ChaosDM source

Post by Paril »

Hello.

I'm wondering where I can retrieve the ChaosDM source code. I would like to make an updated version, since most Quake2 mods have stopped development.

-Paril Kalashnikov
Need help with a Quake2 mod? I'll help you out!
Email/Msn me at jonno.5000@gmail.com
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Sent.
Jb
Paril
Posts: 4
Joined: Thu Apr 20, 2006 1:04 am
Contact:

Umm

Post by Paril »

Missing a file I think.. File with Weapon_Generic2 is not found, I've been looking for the function but it is missing.


-Paril
Need help with a Quake2 mod? I'll help you out!
Email/Msn me at jonno.5000@gmail.com
MrG{DRGN}
Posts: 112
Joined: Sun May 12, 2002 5:27 am
Location: Clinton, NY
Contact:

Post by MrG{DRGN} »

Odd it would be p_weapon.c that you're missing. However since Weapon_Generic2 is defined, and only used in that file it seems odd you'd be having an error refering to that function as being missing. In other words if you don't have that file there is no way the compiler would know it was missing. :!: :?:
MrG{DRGN}


CNY CHAOS
offline:
MrG's AGGRAVATION
BETA MOD SERVER
offline:
Paril
Posts: 4
Joined: Thu Apr 20, 2006 1:04 am
Contact:

Post by Paril »

Weapon_Generic2 is not in p_weapon.c, Weapon_Generic is, which calls 2, but 2 is not found anywhere. I'll just steal it from the CTF code, but let me know if any changes were made to it (probably Vwep stuff)

-Paril
Need help with a Quake2 mod? I'll help you out!
Email/Msn me at jonno.5000@gmail.com
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Wish I could help you but thats all we have...the code is as is from one of the old coders that has left... I did all the UT2k3/4 and some of the UT stuff so not sure whats going on in the Q2 code base :(
Jb
MrG{DRGN}
Posts: 112
Joined: Sun May 12, 2002 5:27 am
Location: Clinton, NY
Contact:

Post by MrG{DRGN} »

from p_weapon.c right above Weapon_Generic.

Code: Select all

static void Weapon_Generic2 (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int FRAME_IDLE_LAST, int FRAME_DEACTIVATE_LAST, int *pause_frames, int *fire_frames, void (*fire)(edict_t *ent))
{
	int		n;

	if (ent->s.modelindex != 255 && ent->client->invisible != true) // vwep
		return; // not on client, so VWep animations could do wacky things

	if (ent->client->weaponstate == WEAPON_DROPPING)
	{
		if (ent->client->ps.gunframe == FRAME_DEACTIVATE_LAST)
		{
			ChangeWeapon (ent);
			return;
		}
		
		ent->client->ps.gunframe++;
		return;
	}

	if (ent->client->weaponstate == WEAPON_ACTIVATING)
	{
		if (ent->client->ps.gunframe == FRAME_ACTIVATE_LAST)
		{
			ent->client->weaponstate = WEAPON_READY;
			ent->client->ps.gunframe = FRAME_IDLE_FIRST;
			return;
		}

		ent->client->ps.gunframe++;
		return;
	}

	if ((ent->client->newweapon) && (ent->client->weaponstate != WEAPON_FIRING))
	{
		ent->client->weaponstate = WEAPON_DROPPING;
		ent->client->ps.gunframe = FRAME_DEACTIVATE_FIRST;
		return;
	}

	if (ent->client->weaponstate == WEAPON_READY)
	{
		if ( ((ent->client->latched_buttons|ent->client->buttons) & BUTTON_ATTACK) )
		{
			ent->client->latched_buttons &= ~BUTTON_ATTACK;
			if ((!ent->client->ammo_index) || 
				( ent->client->pers.inventory[ent->client->ammo_index] >= ent->client->pers.weapon->quantity))
			{
				ent->client->ps.gunframe = FRAME_FIRE_FIRST;
				ent->client->weaponstate = WEAPON_FIRING;

				// start the animation
				ent->client->anim_priority = ANIM_ATTACK;
				if (ent->client->ps.pmove.pm_flags & PMF_DUCKED)
				{
					ent->s.frame = FRAME_crattak1-1;
					ent->client->anim_end = FRAME_crattak9;
				}
				else
				{
					ent->s.frame = FRAME_attack1-1;
					ent->client->anim_end = FRAME_attack8;
				}
			}
			else
			{
				if (level.time >= ent->pain_debounce_time)
				{
					gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0);
					ent->pain_debounce_time = level.time + 1;
				}
				NoAmmoWeaponChange (ent);
			}
		}
		else
		{
			if (ent->client->ps.gunframe == FRAME_IDLE_LAST)
			{
				ent->client->ps.gunframe = FRAME_IDLE_FIRST;
				return;
			}

			if (pause_frames)
			{
				for (n = 0; pause_frames[n]; n++)
				{
					if (ent->client->ps.gunframe == pause_frames[n])
					{
						if (rand()&15)
							return;
					}
				}
			}

			ent->client->ps.gunframe++;
			return;
		}
	}

	if (ent->client->weaponstate == WEAPON_FIRING)
	{
		for (n = 0; fire_frames[n]; n++)
		{
			if (ent->client->ps.gunframe == fire_frames[n])
			{
//ZOID
				if (!CTFApplyStrengthSound(ent))
//ZOID
				if (ent->client->quad_framenum > level.framenum)
					gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage3.wav"), 1, ATTN_NORM, 0);
//ZOID
				//CTFApplyHasteSound(ent);
//ZOID

				fire (ent);
				break;
			}
		}

		if (!fire_frames[n])
			ent->client->ps.gunframe++;

		if (ent->client->ps.gunframe == FRAME_IDLE_FIRST+1)
			ent->client->weaponstate = WEAPON_READY;
	}
}


hope this helps.

JB could you please send me a copy of the code so I can see if indeed anything is missing from it or what the problem might be It SHOULD be identical to what I have as I have the last code Frederico was working on.
MrG{DRGN}


CNY CHAOS
offline:
MrG's AGGRAVATION
BETA MOD SERVER
offline:
Paril
Posts: 4
Joined: Thu Apr 20, 2006 1:04 am
Contact:

Post by Paril »

Alright, sorry. I was searching in the func list, didn't know it was static :)
Need help with a Quake2 mod? I'll help you out!
Email/Msn me at jonno.5000@gmail.com
MrG{DRGN}
Posts: 112
Joined: Sun May 12, 2002 5:27 am
Location: Clinton, NY
Contact:

Post by MrG{DRGN} »

yep no problem. The function should be static since its only used in that file. Quake2 code isn't in great style but its very functional.
MrG{DRGN}


CNY CHAOS
offline:
MrG's AGGRAVATION
BETA MOD SERVER
offline:
General_Sun
Posts: 446
Joined: Wed Jun 23, 2004 10:51 pm
Contact:

Post by General_Sun »

It's great to see Chaos fans everywhere. :wink:
High Council member of The Generals
Image
Post Reply