diff --git a/include/records.hrl b/include/records.hrl index ba17651..cb2c6c8 100644 --- a/include/records.hrl +++ b/include/records.hrl @@ -31,7 +31,7 @@ %% @todo Probably can use a "param" or "extra" field to store the game-specific information (for things that don't need to be queried). -record(egs_user_model, { - id, pid, socket, state, time, character, instancepid, partypid, areatype, area, entryid, counterid, pos, + id, pid, socket, state, time, character, instancepid, partypid, areatype, area, entryid, pos, %% psu specific fields lid, setid, prev_area, prev_entryid, %% temporary fields diff --git a/src/psu/psu_game.erl b/src/psu/psu_game.erl index 8668871..a790bb5 100644 --- a/src/psu/psu_game.erl +++ b/src/psu/psu_game.erl @@ -299,7 +299,7 @@ area_load(QuestID, ZoneID, MapID, EntryID) -> {RetPid, RetSetID}; true -> {OldUser#egs_user_model.instancepid, OldUser#egs_user_model.setid} end, - User = OldUser#egs_user_model{instancepid=InstancePid, areatype=AreaType, area={psu_area, QuestID, RealZoneID, RealMapID}, entryid=RealEntryID, counterid=undefined}, + User = OldUser#egs_user_model{instancepid=InstancePid, areatype=AreaType, area={psu_area, QuestID, RealZoneID, RealMapID}, entryid=RealEntryID}, egs_user_model:write(User), RealSetID = if SetID > NbSetsInZone - 1 -> NbSetsInZone - 1; true -> SetID end, area_load(AreaType, IsStart, RealSetID, OldUser, User, QuestFile, ZoneFile, AreaName). @@ -533,7 +533,7 @@ event({counter_enter, CounterID, FromZoneID, FromMapID, FromEntryID}) -> {ok, OldUser} = egs_user_model:read(get(gid)), OldArea = OldUser#egs_user_model.area, FromArea = {psu_area, OldArea#psu_area.questid, FromZoneID, FromMapID}, - User = OldUser#egs_user_model{areatype=counter, area={psu_area, 16#7fffffff, 0, 0}, entryid=0, counterid=CounterID, prev_area=FromArea, prev_entryid=FromEntryID}, + User = OldUser#egs_user_model{areatype=counter, area={psu_area, 16#7fffffff, 0, 0}, entryid=0, prev_area=FromArea, prev_entryid=FromEntryID}, egs_user_model:write(User), AreaName = "Counter", QuestFile = "data/lobby/counter.quest.nbl",