Esempio n. 1
0
/**
 * @brief Register this think function once you would like to end the match
 * This think function will register the touch callback and spawns the particles for
 * the client to see the next map trigger.
 */
void Think_NextMapTrigger (Edict* self)
{
	vec3_t center;
	pos3_t centerPos;

	self->absBox.getCenter(center);

	/* spawn the particle to mark the trigger */
	G_SpawnParticle(center, self->spawnflags, self->particle);
	VecToPos(center, centerPos);
	G_EventCenterViewAt(PM_ALL, centerPos);

	gi.BroadcastPrintf(PRINT_HUD, _("You are now ready to switch the map."));

	self->setTouch(Touch_NextMapTrigger);
	self->think = nullptr;
}
Esempio n. 2
0
/**
 * @brief Centers the view for all clients that are seeing the given edict on the world position of the edict
 * @param[in] ent The edict to use the position from
 */
void G_EventCenterView (const Edict& ent)
{
	G_EventCenterViewAt(G_VisToPM(ent.visflags), ent.pos);
}
Esempio n. 3
0
/**
 * @brief Centers the view for all clients that are seeing the given edict on the world position of the edict
 * @param[in] ent The edict to use the position from
 */
void G_EventCenterView (const edict_t *ent)
{
	G_EventCenterViewAt(G_VisToPM(ent->visflags), ent->pos);
}