예제 #1
0
파일: cg_luaplayer.c 프로젝트: Zerodin/japp
static int JPLua_Player_GetLocation( lua_State *L )
{
	jplua_player_t *player = JPLua_CheckPlayer( L, 1 );
	lua_pushstring( L, CG_GetLocationString( CG_ConfigString( CS_LOCATIONS+cgs.clientinfo[player->clientNum].location ) ) );

	return 1;
}
예제 #2
0
파일: bg_luaplayer.cpp 프로젝트: Mauii/japp
	static int Player_GetLocation( lua_State *L, jpluaEntity_t *ent ) {
	#if defined(PROJECT_GAME)
		char location[64];
		if ( Team_GetLocationMsg( ent, location, sizeof(location) ) ) {
			lua_pushstring( L, location );
		}
		else {
			lua_pushnil( L );
		}
	#elif defined(PROJECT_CGAME)
		lua_pushstring( L,
			CG_GetLocationString( CG_ConfigString( CS_LOCATIONS + cgs.clientinfo[(int)(ent - ents)].location ) )
		);
	#endif

		return 1;
	}