Skip to content

Commit

Permalink
xrGame: More minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegeri committed Sep 16, 2018
1 parent a7e4f40 commit e04dd5f
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void CBloodsuckerStateAttackAbstract::setup_substates()

if (current_substate == eStateAttack_Hide)
{
CStateMonsterBackstubEnemy<_Object>::StateParams data;
typename CStateMonsterBackstubEnemy<_Object>::StateParams data;

data.action.action = ACT_RUN;
data.action.time_out = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ai/monsters/monster_state_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CMonsterStateManager : public IStateManagerBase, public CState<_Object>
virtual void force_script_state(EMonsterState state);
virtual void execute_script_state();
virtual void critical_finalize();
virtual void remove_links(IGameObject* object) = 0 { inherited::remove_links(object); }
virtual void remove_links(IGameObject* object) = 0;
virtual EMonsterState get_state_type();

virtual bool check_control_start_conditions(ControlCom::EControlType type)
Expand Down
6 changes: 6 additions & 0 deletions src/xrGame/ai/monsters/monster_state_manager_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ namespace detail
bool object_exists_in_alife_registry(u32 id);
} // namespace detail

TEMPLATE_SPECIALIZATION
void CMonsterStateManagerAbstract::remove_links(IGameObject* object)
{
inherited::remove_links(object);
}

TEMPLATE_SPECIALIZATION
void CMonsterStateManagerAbstract::update()
{
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/ai/monsters/pseudodog/psy_dog.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "pseudodog.h"

class CPsyDogPhantom;
class CPsyDogAura;

class CPsyDog : public CAI_PseudoDog
{
Expand Down
4 changes: 2 additions & 2 deletions src/xrGame/autosave_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ void CAutosaveManager::shedule_Update(u32 dt)
FS.update_path(S1, "$game_saves$", temp);

MainMenu()->Screenshot(IRender::SM_FOR_GAMESAVE, S1);

#ifdef WINDOWS
SetFileAttributes(S1, FILE_ATTRIBUTE_HIDDEN);

#endif
CurrentGameUI()->AddCustomStatic("autosave", true);
}

Expand Down
27 changes: 13 additions & 14 deletions src/xrGame/base_client_classes_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@
#include <loki/HierarchyGenerators.h>
#include "xrServer_Object_Base.h"

template <typename _1, typename _2>
struct heritage
template <typename _type, typename _base>
struct linear_registrator : public _base, public _type
{
template <typename _type, typename _base>
struct linear_registrator : public _base, public _type
{
};
};

template <typename _type>
struct linear_registrator<_type, Loki::EmptyType> : public _type
{
};
template <typename _type>
struct linear_registrator<_type, Loki::EmptyType> : public _type
{
};

typedef Loki::Typelist<_1, Loki::Typelist<_2, Loki::EmptyType>> tl;
typedef typename Loki::TL::Erase<tl, Loki::EmptyType>::Result pure_tl;
typedef typename Loki::GenLinearHierarchy<pure_tl, linear_registrator> result;
template <typename _1, typename _2>
struct heritage
{
using tl = Loki::Typelist<_1, _2>;
using result = Loki::GenLinearHierarchy<tl, linear_registrator>;
};

template <typename base>
Expand All @@ -46,7 +45,7 @@ class FactoryObjectWrapperTpl : public heritage<base, luabind::wrap_base>::resul
IC FactoryObjectWrapperTpl(){};
virtual ~FactoryObjectWrapperTpl(){};

virtual IFactoryObject* _construct() { return (call_member<IFactoryObject*>(this, "_construct")); }
virtual IFactoryObject* _construct() { return (luabind::call_member<IFactoryObject*>(this, "_construct")); }
static IFactoryObject* _construct_static(base* self) { return (self->base::_construct()); }
private:
// not exported
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/cdkey_ban_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void cdkey_ban_list::unban_player_by_index(size_t const index)

char const* print_time(time_t const& src_time, string64& dest_time)
{
tm* tmp_tm = _localtime64(&src_time);
tm* tmp_tm = localtime(&src_time);
xr_sprintf(dest_time, sizeof(dest_time), "%02d.%02d.%d_%02d:%02d:%02d", tmp_tm->tm_mday, tmp_tm->tm_mon + 1,
tmp_tm->tm_year + 1900, tmp_tm->tm_hour, tmp_tm->tm_min, tmp_tm->tm_sec);
return dest_time;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/game_cl_capture_the_artefact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ void game_cl_CaptureTheArtefact::OnRender()
VERIFY(ps->getName());
string64 upper_name;
xr_strcpy(upper_name, ps->getName());
_strupr_s(upper_name);
_strupr(upper_name);
pActor->RenderText(upper_name, IPos, &dup, PLAYER_NAME_COLOR);
}
if (m_bFriendlyIndicators)
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/game_sv_artefacthunt.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class game_sv_ArtefactHunt : public game_sv_TeamDeathmatch
private:
typedef game_sv_TeamDeathmatch inherited;

#undef NONE // FIXME!!! Ugly
enum ARTEFACT_STATE
{
NONE,
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIMapList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void CUIMapList::OnListItemClicked()
m_pMapInfo->InitMap(M.map_name.c_str(), M.map_ver.c_str());
}

xr_token g_GameModes[];
extern xr_token g_GameModes[];

void CUIMapList::OnModeChange() { UpdateMapList(GetCurGameType()); }
EGameIDs CUIMapList::GetCurGameType()
Expand Down

0 comments on commit e04dd5f

Please sign in to comment.