本文整理汇总了C++中G_EventEnd函数的典型用法代码示例。如果您正苦于以下问题:C++ G_EventEnd函数的具体用法?C++ G_EventEnd怎么用?C++ G_EventEnd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_EventEnd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: G_EventModelExplode
void G_EventModelExplode (const Edict& ent, const char* sound)
{
assert(ent.inuse);
G_EventAdd(PM_ALL, EV_MODEL_EXPLODE, ent.number);
gi.WriteString(sound);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例2: G_ActorFall
/**
* @brief Let an actor fall down if e.g. the func_breakable the actor was standing on was destroyed.
* @param[in,out] ent The actor that should fall down
* @todo Handle cases where the grid position the actor would fall to is occupied by another actor already.
*/
void G_ActorFall (edict_t *ent)
{
edict_t* entAtPos;
const int oldZ = ent->pos[2];
ent->pos[2] = gi.GridFall(gi.routingMap, ent->fieldSize, ent->pos);
if (oldZ == ent->pos[2])
return;
entAtPos = G_GetEdictFromPos(ent->pos, ET_NULL);
if (entAtPos != NULL && (G_IsBreakable(entAtPos) || G_IsBlockingMovementActor(entAtPos))) {
const int diff = oldZ - ent->pos[2];
G_TakeDamage(entAtPos, (int)(FALLING_DAMAGE_FACTOR * (float)diff));
}
G_EdictCalcOrigin(ent);
gi.LinkEdict(ent);
G_CheckVis(ent);
G_EventActorFall(ent);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:30,代码来源:g_move.cpp
示例3: G_EventEdictPerish
/**
* @brief Send disappear event
* @param[in] playerMask The bitmask to determine the clients this event is send to
* @param[in,out] ent The edict that perished
*/
void G_EventEdictPerish (playermask_t playerMask, const Edict& ent)
{
assert(ent.inuse);
G_EventAdd(playerMask, EV_ENT_PERISH, ent.number);
gi.WriteByte(ent.type);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:12,代码来源:g_events.cpp
示例4: G_EventReset
void G_EventReset (const player_t *player, int activeTeam)
{
G_EventAdd(G_PlayerToPM(player), EV_RESET | EVENT_INSTANTLY, -1);
gi.WriteByte(player->pers.team);
gi.WriteByte(activeTeam);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例5: G_EventActorDie
/**
* @brief Announce the actor die event for the clients that are seeing the actor
* @param[in] ent The actor that is dying
*/
void G_EventActorDie (const edict_t* ent)
{
G_EventAdd(G_VisToPM(ent->visflags), EV_ACTOR_DIE, ent->number);
gi.WriteShort(ent->state);
gi.WriteByte(ent->pnum);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:11,代码来源:g_events.cpp
示例6: G_EventEndRoundAnnounce
void G_EventEndRoundAnnounce (const player_t *player)
{
G_EventAdd(PM_ALL, EV_ENDROUNDANNOUNCE | EVENT_INSTANTLY, -1);
gi.WriteByte(player->num);
gi.WriteByte(player->pers.team);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例7: G_EventEdictPerish
/**
* @brief Send disappear event
* @param[in] playerMask The bitmask to determine the clients this event is send to
* @param[in,out] ent The edict that perished
*/
void G_EventEdictPerish (unsigned int playerMask, const edict_t *ent)
{
assert(ent->inuse);
G_EventAdd(playerMask, EV_ENT_PERISH, ent->number);
gi.WriteByte(ent->type);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:12,代码来源:g_events.cpp
示例8: G_EventEdictAppear
/**
* @brief Send an appear event to the client.
* @param playerMask The players to send the event to
* @param ent The edict that should appear to the players included in the given mask.
* @note Each following event that is relying on the fact that this edict must already
* be known in the client, must also adopt the client side parsing of the event times.
*/
void G_EventEdictAppear (unsigned int playerMask, const edict_t *ent)
{
G_EventAdd(playerMask, EV_ENT_APPEAR, ent->number);
gi.WriteByte(ent->type);
gi.WriteGPos(ent->pos);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:14,代码来源:g_events.cpp
示例9: G_EventReset
void G_EventReset (const Player& player, int activeTeam)
{
G_EventAdd(G_PlayerToPM(player), EV_RESET | EVENT_INSTANTLY, -1);
gi.WriteByte(player.getTeam());
gi.WriteByte(activeTeam);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例10: G_EventModelExplodeTriggered
void G_EventModelExplodeTriggered (const Edict& ent, const char* sound)
{
assert(ent.inuse);
G_EventAdd(PM_ALL, EV_MODEL_EXPLODE_TRIGGERED, ent.getIdNum());
gi.WriteString(sound);
G_EventEnd();
}
开发者ID:ArkyRomania,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例11: G_EventEdictAppear
/**
* @brief Send an appear event to the client.
* @param playerMask The players to send the event to
* @param ent The edict that should appear to the players included in the given mask.
* @note Each following event that is relying on the fact that this edict must already
* be known in the client, must also adopt the client side parsing of the event times.
*/
void G_EventEdictAppear (playermask_t playerMask, const Edict& ent)
{
G_EventAdd(playerMask, EV_ENT_APPEAR, ent.number);
gi.WriteByte(ent.type);
gi.WriteGPos(ent.pos);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:14,代码来源:g_events.cpp
示例12: G_EventEndRoundAnnounce
void G_EventEndRoundAnnounce (const Player& player)
{
G_EventAdd(PM_ALL, EV_ENDROUNDANNOUNCE, -1);
gi.WriteByte(player.getNum());
gi.WriteByte(player.getTeam());
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:7,代码来源:g_events.cpp
示例13: G_EventSendParticle
/**
* Send a particle spawn event to the client
* @param[in] playerMask The clients that should see the particle
* @param[in] ent The particle to spawn
*/
void G_EventSendParticle (playermask_t playerMask, const Edict& ent)
{
G_EventAdd(playerMask, EV_PARTICLE_APPEAR, ent.number);
gi.WriteShort(ent.spawnflags);
gi.WritePos(ent.origin);
gi.WriteString(ent.particle);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:13,代码来源:g_events.cpp
示例14: G_EventSendState
void G_EventSendState (playermask_t playerMask, const Edict& ent)
{
G_EventActorStateChange(playerMask & G_TeamToPM(ent.team), ent);
G_EventAdd(playerMask & ~G_TeamToPM(ent.team), EV_ACTOR_STATECHANGE, ent.number);
gi.WriteShort(ent.state & STATE_PUBLIC);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:8,代码来源:g_events.cpp
示例15: G_EventSendEdict
/**
* @brief Send the bounding box info to the client.
* @param[in] ent The edict to send the bounding box for
*/
void G_EventSendEdict (const Edict& ent)
{
G_EventAdd(PM_ALL, EV_ADD_EDICT, ent.number);
gi.WriteByte(ent.type);
gi.WritePos(ent.absBox.mins);
gi.WritePos(ent.absBox.maxs);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:12,代码来源:g_events.cpp
示例16: G_EventSendEdict
/**
* @brief Send the bounding box info to the client.
* @param[in] ent The edict to send the bounding box for
*/
void G_EventSendEdict (const edict_t *ent)
{
G_EventAdd(PM_ALL, EV_ADD_EDICT, ent->number);
gi.WriteByte(ent->type);
gi.WritePos(ent->absmin);
gi.WritePos(ent->absmax);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:12,代码来源:g_events.cpp
示例17: G_EventSendParticle
/**
* Send a particle spawn event to the client
* @param[in] playerMask The clients that should see the particle
* @param[in] ent The particle to spawn
*/
void G_EventSendParticle (unsigned int playerMask, const edict_t *ent)
{
G_EventAdd(playerMask, EV_PARTICLE_APPEAR, ent->number);
gi.WriteShort(ent->spawnflags);
gi.WritePos(ent->origin);
gi.WriteString(ent->particle);
G_EventEnd();
}
开发者ID:jklemmack,项目名称:ufoai,代码行数:13,代码来源:g_events.cpp
示例18: G_EventActorDie
/**
* @brief Announce the actor die event for the clients that are seeing the actor
* @param[in] ent The actor that is dying
*/
void G_EventActorDie (const Edict& ent, bool attacker)
{
G_EventAdd(G_VisToPM(ent.visflags), EV_ACTOR_DIE, ent.number);
gi.WriteShort(ent.state);
gi.WriteByte(ent.pnum);
gi.WriteByte(attacker);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:12,代码来源:g_events.cpp
示例19: G_EventStartShoot
/**
* @brief Start the shooting event
* @param ent The entity that starts the shooting
* @param teamMask the vis mask of the teams to determine the clients from this event is send to
* @param shootType The type of the shoot
* @param at The grid position to target to
*/
void G_EventStartShoot (const Edict& ent, teammask_t teamMask, shoot_types_t shootType, const pos3_t at)
{
G_EventAdd(G_VisToPM(teamMask), EV_ACTOR_START_SHOOT, ent.number);
gi.WriteByte(shootType);
gi.WriteGPos(ent.pos);
gi.WriteGPos(at);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:15,代码来源:g_events.cpp
示例20: G_EventInventoryDelete
/**
* @brief Tell the client to remove the item from the container
* @param[in] ent Pointer to entity having given inventory.
* @param[in] playerMask The player mask to determine which clients should receive the event (e.g. @c G_VisToPM(ent->visflags))
* @param[in] containerId Id of the container the item is in.
* @param[in] x,y Position of item in container.
*/
void G_EventInventoryDelete (const Edict& ent, playermask_t playerMask, const containerIndex_t containerId, int x, int y)
{
G_EventAdd(playerMask, EV_INV_DEL, ent.number);
gi.WriteByte(containerId);
gi.WriteByte(x);
gi.WriteByte(y);
G_EventEnd();
}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:15,代码来源:g_events.cpp
注:本文中的G_EventEnd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论