Add single-person warp function.
This commit is contained in:
parent
778eddc298
commit
c0fdfd7a26
@ -17,7 +17,7 @@
|
||||
% along with EGS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-module(egs).
|
||||
-export([start/0, reload/0, global/2, warp/3]).
|
||||
-export([start/0, reload/0, global/2, warp/3, warp/4]).
|
||||
|
||||
-include("include/records.hrl").
|
||||
|
||||
@ -51,3 +51,9 @@ global(Type, Message) ->
|
||||
|
||||
warp(MapType, MapNumber, MapEntry) ->
|
||||
lists:foreach(fun(User) -> egs_game:lobby_load(User#users.socket, User#users.gid, MapType, MapNumber, MapEntry) end, egs_db:users_select_all()).
|
||||
|
||||
%% @doc Warp one player to a new map.
|
||||
|
||||
warp(GID, MapType, MapNumber, MapEntry) ->
|
||||
User = egs_db:users_select(GID),
|
||||
egs_game:lobby_load(User#users.socket, User#users.gid, MapType, MapNumber, MapEntry).
|
||||
|
Loading…
Reference in New Issue
Block a user