这篇教程C++ G_EventEnd函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中G_EventEnd函数的典型用法代码示例。如果您正苦于以下问题:C++ G_EventEnd函数的具体用法?C++ G_EventEnd怎么用?C++ G_EventEnd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了G_EventEnd函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: G_EventModelExplodevoid 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,
示例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,
示例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,
示例4: G_EventResetvoid 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,
示例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,
示例6: G_EventEndRoundAnnouncevoid 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,
示例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,
示例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,
示例9: G_EventResetvoid 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,
示例10: G_EventModelExplodeTriggeredvoid 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,
示例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,
示例12: G_EventEndRoundAnnouncevoid 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,
示例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,
示例14: G_EventSendStatevoid 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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例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,
示例21: G_EventSendStatevoid G_EventSendState (unsigned int playerMask, const edict_t *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:jklemmack,项目名称:ufoai,代码行数:8,
示例22: 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] invDef Pointer to inventory definition having given container. * @param[in] x Position of item in container. * @param[in] y Position of item in container. */void G_EventInventoryDelete (const edict_t* ent, int playerMask, const invDef_t* invDef, int x, int y){ G_EventAdd(playerMask, EV_INV_DEL, ent->number); gi.WriteByte(invDef->id); gi.WriteByte(x); gi.WriteByte(y); G_EventEnd();}
开发者ID:jklemmack,项目名称:ufoai,代码行数:16,
示例23: G_EventStartShoot/** * @brief Start the shooting event * @param ent The entity that starts the shooting * @param visMask 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_t* ent, vismask_t visMask, shoot_types_t shootType, const pos3_t at){ G_EventAdd(G_VisToPM(visMask), EV_ACTOR_START_SHOOT, ent->number); gi.WriteByte(shootType); gi.WriteGPos(ent->pos); gi.WriteGPos(at); G_EventEnd();}
开发者ID:jklemmack,项目名称:ufoai,代码行数:15,
示例24: G_EventActorStatsvoid G_EventActorStats (const Edict& ent, playermask_t playerMask){ G_EventAdd(playerMask, EV_ACTOR_STATS, ent.getIdNum()); gi.WriteByte(ent.TU); gi.WriteShort(ent.HP); gi.WriteByte(ent.getStun()); gi.WriteByte(ent.morale); G_EventEnd();}
开发者ID:ArkyRomania,项目名称:ufoai,代码行数:9,
示例25: G_EventShootHidden/** * @brief Start the shooting event for hidden actors * @param teamMask the vis mask to determine the clients from this event is send to * @param fd The firedefinition to use for the shoot * @param firstShoot Is this the first shoot */void G_EventShootHidden (teammask_t teamMask, const fireDef_t* fd, bool firstShoot){ G_EventAdd(~G_VisToPM(teamMask), EV_ACTOR_SHOOT_HIDDEN, -1); gi.WriteByte(firstShoot); gi.WriteShort(fd->obj->idx); gi.WriteByte(fd->weapFdsIdx); gi.WriteByte(fd->fdIdx); G_EventEnd();}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:15,
示例26: G_EventActorStatsvoid G_EventActorStats (const Edict& ent, playermask_t playerMask){ G_EventAdd(playerMask, EV_ACTOR_STATS, ent.number); gi.WriteByte(ent.TU); gi.WriteShort(ent.HP); gi.WriteByte(ent.STUN); gi.WriteByte(ent.morale); G_EventEnd();}
开发者ID:Maximaximum,项目名称:ufoai,代码行数:9,
注:本文中的G_EventEnd函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ G_FILE函数代码示例 C++ G_EventAdd函数代码示例 |