UFO: Alien Invasion
Loading...
Searching...
No Matches
e_event_invadd.cpp File Reference
Include dependency graph for e_event_invadd.cpp:

Go to the source code of this file.

Functions

static void CL_NetReceiveItem (dbuffer *buf, Item *item, containerIndex_t *container, int *x, int *y)
int CL_InvAddTime (const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
 Decides if following events should be delayed.
void CL_InvAdd (const eventRegister_t *self, dbuffer *msg)

Function Documentation

◆ CL_InvAdd()

◆ CL_InvAddTime()

int CL_InvAddTime ( const struct eventRegister_s * self,
dbuffer * msg,
eventTiming_t * eventTiming )

Decides if following events should be delayed.

Todo
but if the dying actor didn't have any item in its inventory this event won't be sent, the next unrelated EV_INV_ADD event might be badly scheduled

Definition at line 58 of file e_event_invadd.cpp.

References cl, eventTiming_t::impactTime, eventTiming_t::nextTime, eventTiming_t::parsedDeath, and eventTiming_t::parsedShot.

◆ CL_NetReceiveItem()

void CL_NetReceiveItem ( dbuffer * buf,
Item * item,
containerIndex_t * container,
int * x,
int * y )
static
See also
G_WriteItem
G_ReadItem
Note
The amount of the Item should not be needed here - because the amount is only valid for CID_FLOOR and CID_EQUIP

Definition at line 35 of file e_event_invadd.cpp.

References CL_GetEvent(), Com_Error(), Item::def(), ERR_DROP, EV_INV_TRANSFER, eventRegister_t::formatString, INVSH_GetItemByIDX(), NET_ReadFormat(), NONE_AMMO, Item::rotated, Item::setAmmoDef(), Item::setAmmoLeft(), Item::setAmount(), and Item::setDef().

Referenced by CL_InvAdd().