UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
e_event_invadd.cpp File Reference

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. More...
 
void CL_InvAdd (const eventRegister_t *self, dbuffer *msg)
 

Function Documentation

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_s::impactTime, eventTiming_s::nextTime, eventTiming_s::parsedDeath, eventTiming_s::parsedShot, and clientBattleScape_s::time.

static 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_s::formatString, INVSH_GetItemByIDX(), NET_ReadFormat(), NONE_AMMO, Item::rotated, Item::setAmmoDef(), Item::setAmmoLeft(), Item::setAmount(), and Item::setDef().

Referenced by CL_InvAdd().