Source code question : Abilities file?

Status
Not open for further replies.

Sonichu

bought a 4chan gold account
Would anyone here be able to tell me which files contain the coding for abilities?
 
Last edited:
Code:
//Primary and secondary skin abilities
#define CA_THOK              0
#define CA_FLY               1
#define CA_GLIDEANDCLIMB     2
#define CA_DOUBLEJUMP        3
#define CA_FLOAT             4
#define CA_SLOWFALL          5
#define CA_SWIM              6
#define CA_HOMINGTHOK        7
Which number defines which ability is determined by this piece of code inside the d_player.h file.




Code:
static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
{

...

if (cmd->buttons & BT_JUMP && !(player->pflags & PF_JUMPDOWN) && !player->exiting && !(!(player->pflags & PF_SLIDING) && player->mo->state == &states[player->mo->info->painstate] && player->powers[pw_flashing]))
	{

         ...

		else if (!(player->pflags & PF_SLIDING) && ((gametype != GT_CTF) || (!player->gotflag)))
		{
			switch (player->charability)
			{
				case CA_THOK:
				case CA_HOMINGTHOK:

                                      ...

				case CA_FLY:
				case CA_SWIM:

                                      ...
... and so on...
The actual ability execution code is located inside the p_user.c file. I just listed the head of the functions it is located in. "..." stands for cut out code.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top