Jump to content

Home

couple questions


Coasterdude

Recommended Posts

the ammo is an array and its the ammo defines in bg_weapons files.

 

so... ent->client->ps.ammo[AMMO_BLASTER] is ammo you have for blaster-type weapons.

 

the weapon int is players current weapon. Weapons are stored in stats[sTAT_WEAPONS] and you cannot have more than 19 bits. all other STAT_ items cannot have more than 16 bits.

 

theres no easy way to describe how to check weapons especially if you have no knowledge of how bits work...

 

but:

 

if (ent->client->ps.stats[sTAT_WEAPONS] & (1 << WP_SABER)) // has saber
ent->client->ps.stats[sTAT_WEAPONS] |= (1 << WP_MELEE); // append melee
ent->client->ps.weapon = WP_SABER; // set current weapon
ent->client->ps.stats[sTAT_WEAPONS] &= ~(1 << WP_ROCKET_LAUNCHER); // removes rocket launcher

Link to comment
Share on other sites

positive forwardmove in ucmd means going forwards

negative forwardmove in ucmd means going backwards

positive rightmove in ucmd means going right

negative rightmove in ucmd means going left

positive upmove in ucmd means jumping

negative upmove in ucmd means crouching (also pm_flag PMF_DUCKED) represents actually crouching)

 

what exactly are you looking to do here?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...