Skip to content

Commit e04dd5f

Browse files
committed
xrGame: More minor fixes
1 parent a7e4f40 commit e04dd5f

File tree

10 files changed

+28
-21
lines changed

10 files changed

+28
-21
lines changed

src/xrGame/ai/monsters/bloodsucker/bloodsucker_attack_state_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void CBloodsuckerStateAttackAbstract::setup_substates()
187187

188188
if (current_substate == eStateAttack_Hide)
189189
{
190-
CStateMonsterBackstubEnemy<_Object>::StateParams data;
190+
typename CStateMonsterBackstubEnemy<_Object>::StateParams data;
191191

192192
data.action.action = ACT_RUN;
193193
data.action.time_out = 0;

src/xrGame/ai/monsters/monster_state_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CMonsterStateManager : public IStateManagerBase, public CState<_Object>
1919
virtual void force_script_state(EMonsterState state);
2020
virtual void execute_script_state();
2121
virtual void critical_finalize();
22-
virtual void remove_links(IGameObject* object) = 0 { inherited::remove_links(object); }
22+
virtual void remove_links(IGameObject* object) = 0;
2323
virtual EMonsterState get_state_type();
2424

2525
virtual bool check_control_start_conditions(ControlCom::EControlType type)

src/xrGame/ai/monsters/monster_state_manager_inline.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ namespace detail
1313
bool object_exists_in_alife_registry(u32 id);
1414
} // namespace detail
1515

16+
TEMPLATE_SPECIALIZATION
17+
void CMonsterStateManagerAbstract::remove_links(IGameObject* object)
18+
{
19+
inherited::remove_links(object);
20+
}
21+
1622
TEMPLATE_SPECIALIZATION
1723
void CMonsterStateManagerAbstract::update()
1824
{

src/xrGame/ai/monsters/pseudodog/psy_dog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "pseudodog.h"
33

44
class CPsyDogPhantom;
5+
class CPsyDogAura;
56

67
class CPsyDog : public CAI_PseudoDog
78
{

src/xrGame/autosave_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void CAutosaveManager::shedule_Update(u32 dt)
7373
FS.update_path(S1, "$game_saves$", temp);
7474

7575
MainMenu()->Screenshot(IRender::SM_FOR_GAMESAVE, S1);
76-
76+
#ifdef WINDOWS
7777
SetFileAttributes(S1, FILE_ATTRIBUTE_HIDDEN);
78-
78+
#endif
7979
CurrentGameUI()->AddCustomStatic("autosave", true);
8080
}
8181

src/xrGame/base_client_classes_wrappers.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,21 @@
2121
#include <loki/HierarchyGenerators.h>
2222
#include "xrServer_Object_Base.h"
2323

24-
template <typename _1, typename _2>
25-
struct heritage
24+
template <typename _type, typename _base>
25+
struct linear_registrator : public _base, public _type
2626
{
27-
template <typename _type, typename _base>
28-
struct linear_registrator : public _base, public _type
29-
{
30-
};
27+
};
3128

32-
template <typename _type>
33-
struct linear_registrator<_type, Loki::EmptyType> : public _type
34-
{
35-
};
29+
template <typename _type>
30+
struct linear_registrator<_type, Loki::EmptyType> : public _type
31+
{
32+
};
3633

37-
typedef Loki::Typelist<_1, Loki::Typelist<_2, Loki::EmptyType>> tl;
38-
typedef typename Loki::TL::Erase<tl, Loki::EmptyType>::Result pure_tl;
39-
typedef typename Loki::GenLinearHierarchy<pure_tl, linear_registrator> result;
34+
template <typename _1, typename _2>
35+
struct heritage
36+
{
37+
using tl = Loki::Typelist<_1, _2>;
38+
using result = Loki::GenLinearHierarchy<tl, linear_registrator>;
4039
};
4140

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

49-
virtual IFactoryObject* _construct() { return (call_member<IFactoryObject*>(this, "_construct")); }
48+
virtual IFactoryObject* _construct() { return (luabind::call_member<IFactoryObject*>(this, "_construct")); }
5049
static IFactoryObject* _construct_static(base* self) { return (self->base::_construct()); }
5150
private:
5251
// not exported

src/xrGame/cdkey_ban_list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void cdkey_ban_list::unban_player_by_index(size_t const index)
159159

160160
char const* print_time(time_t const& src_time, string64& dest_time)
161161
{
162-
tm* tmp_tm = _localtime64(&src_time);
162+
tm* tmp_tm = localtime(&src_time);
163163
xr_sprintf(dest_time, sizeof(dest_time), "%02d.%02d.%d_%02d:%02d:%02d", tmp_tm->tm_mday, tmp_tm->tm_mon + 1,
164164
tmp_tm->tm_year + 1900, tmp_tm->tm_hour, tmp_tm->tm_min, tmp_tm->tm_sec);
165165
return dest_time;

src/xrGame/game_cl_capture_the_artefact.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ void game_cl_CaptureTheArtefact::OnRender()
15921592
VERIFY(ps->getName());
15931593
string64 upper_name;
15941594
xr_strcpy(upper_name, ps->getName());
1595-
_strupr_s(upper_name);
1595+
_strupr(upper_name);
15961596
pActor->RenderText(upper_name, IPos, &dup, PLAYER_NAME_COLOR);
15971597
}
15981598
if (m_bFriendlyIndicators)

src/xrGame/game_sv_artefacthunt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class game_sv_ArtefactHunt : public game_sv_TeamDeathmatch
77
private:
88
typedef game_sv_TeamDeathmatch inherited;
99

10+
#undef NONE // FIXME!!! Ugly
1011
enum ARTEFACT_STATE
1112
{
1213
NONE,

src/xrGame/ui/UIMapList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void CUIMapList::OnListItemClicked()
145145
m_pMapInfo->InitMap(M.map_name.c_str(), M.map_ver.c_str());
146146
}
147147

148-
xr_token g_GameModes[];
148+
extern xr_token g_GameModes[];
149149

150150
void CUIMapList::OnModeChange() { UpdateMapList(GetCurGameType()); }
151151
EGameIDs CUIMapList::GetCurGameType()

0 commit comments

Comments
 (0)