Пример #1
0
static void SP_misc_camera (Edict* ent)
{
	/* only used in single player */
	if (G_IsMultiPlayer()) {
		G_FreeEdict(ent);
		return;
	}

	const bool rotate = ent->spawnflags & CAMERA_ROTATE;
	G_InitCamera(ent, CAMERA_STATIONARY, ent->angle, rotate);
}
Пример #2
0
static void SP_misc_camera (edict_t *ent)
{
	/* only used in single player */
	if (sv_maxclients->integer != 1) {
		G_FreeEdict(ent);
		return;
	}

	const bool rotate = ent->spawnflags & CAMERA_ROTATE;
	G_InitCamera(ent, CAMERA_STATIONARY, ent->angle, rotate);
}
Пример #3
0
Edict* G_SpawnCamera (const vec3_t origin, int team, camera_type_t cameraType)
{
	Edict* ent = G_Spawn();
	VectorCopy(origin, ent->origin);
	ent->team = team;

	G_InitCamera(ent, cameraType, 0, true);

	G_CheckVis(ent);

	return ent;
}