1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00
Commit Graph

30 Commits

Author SHA1 Message Date
Benoist
8a6d1c6cd2
TF2 win64 + Ambuild tier1/mathlib + long=devil (#198)
* Fix compilation for windows, setup ambuild

* Add built tier1 and mathlib for win64

* Ensure compilation is working on windows and linux

* Add -fPIC

* Add compiled libs, with optimisation enabled

* Added windows lib

* Fix hl2sdk for windows

* Longs are the devil

* Fix up threadtools functions

* Add updated libs

* Rework lib naming, and package script

* Update lib directory according to new packaging

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-03-09 03:57:12 +00:00
Benoist
dcf515fea8
Prepare for TF2 64bits (#127)
* Prepare for 64bits

* Add the dynamic and static librairies

* Delete choreoobjects_x86_64.a

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
2024-01-26 13:19:59 +00:00
sappho
4235f23520
fix conflicting return type (#99)
* fix conflicting return type

Example bad compile:
```c
[  6%] Building CXX object CMakeFiles/TFTrue.dir/AutoUpdater.cpp.o
In file included from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:45:24: error: conflicting return type specified for ‘virtual const Vector& CGameMovement::GetPlayerMins(bool) const’
   45 |  virtual const Vector& GetPlayerMins( bool ducked ) const;
      |                        ^~~~~~~~~~~~~
In file included from /home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:15,
                 from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/igamemovement.h:122:17: note: overridden function is ‘virtual Vector IGameMovement::GetPlayerMins(bool) const’
  122 |  virtual Vector GetPlayerMins( bool ducked ) const = 0;
      |                 ^~~~~~~~~~~~~
In file included from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:46:24: error: conflicting return type specified for ‘virtual const Vector& CGameMovement::GetPlayerMaxs(bool) const’
   46 |  virtual const Vector& GetPlayerMaxs( bool ducked ) const;
      |                        ^~~~~~~~~~~~~
In file included from /home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:15,
                 from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/igamemovement.h:123:17: note: overridden function is ‘virtual Vector IGameMovement::GetPlayerMaxs(bool) const’
  123 |  virtual Vector GetPlayerMaxs( bool ducked ) const = 0;
      |                 ^~~~~~~~~~~~~
In file included from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:47:24: error: conflicting return type specified for ‘virtual const Vector& CGameMovement::GetPlayerViewOffset(bool) const’
   47 |  virtual const Vector& GetPlayerViewOffset( bool ducked ) const;
      |                        ^~~~~~~~~~~~~~~~~~~
In file included from /home/steph/TFTrue/hl2sdk-tf2/game/shared/gamemovement.h:15,
                 from /home/steph/TFTrue/SDK.h:38,
                 from /home/steph/TFTrue/AutoUpdater.h:27,
                 from /home/steph/TFTrue/AutoUpdater.cpp:19:
/home/steph/TFTrue/hl2sdk-tf2/game/shared/igamemovement.h:124:18: note: overridden function is ‘virtual Vector IGameMovement::GetPlayerViewOffset(bool) const’
  124 |  virtual Vector  GetPlayerViewOffset( bool ducked ) const = 0;
      |                  ^~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/TFTrue.dir/build.make:82: CMakeFiles/TFTrue.dir/AutoUpdater.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/TFTrue.dir/all] Error 2
gmake: *** [Makefile:103: all] Error 2
```

This should've been updated when this was updated:

5ad032f350

* part 2
2022-05-23 04:56:52 +00:00
Scott Ehlert
7ee1f97dd6 Imported more changes from sdk2013. 2017-05-30 15:22:52 -05:00
sigsegv
669d017fda Fix cases where V_swap didn't need the global scope resolution operator 2016-01-24 17:23:29 -08:00
sigsegv
0edbd27fb8 Backport swap() -> V_swap() rename to avoid C++11 ADL ambiguity errors
The swap() function provided in the MathLib header was renamed to V_swap in recent Source SDK versions (e.g. 2013) to avoid causing ambiguity problems with std::swap(). But older SDK versions (such as TF2) lack this change, as they predate it.

The ambiguity between MathLib's swap() and std::swap() causes considerable problems when using newer features of C++ (such as std::unique_ptr) which internally call swap() in an unqualified manner to implement move semantics:

/usr/include/c++/5.2.0/bits/unique_ptr.h:342:6: error: call of overloaded ‘swap(MyType*&, MyType*&)’ is ambiguous
/usr/include/c++/5.2.0/bits/move.h:176:5: note: candidate: void std::swap(_Tp&, _Tp&) [with _Tp = MyType*]
hl2sdk-tf2/public/mathlib/mathlib.h:611:18: note: candidate: void swap(T&, T&) [with T = MyType*]

This patch backports the swap() -> V_swap() rename from the 2013 SDK version to the TF2 SDK version, so that the TF2 SDK can be used in conjunction with C++11 features such as std::unique_ptr without difficulty.

More information on why swap() isn't called in a namespace-qualified manner by standard library functions:
http://en.cppreference.com/w/cpp/language/adl#Notes
2016-01-24 16:44:52 -08:00
Nicholas Hastings
53c23fed59 Add crit type to CTakeDamageInfo. 2015-11-11 13:01:15 -05:00
Nicholas Hastings
7fd8c26a9b Update CTakeDamageInfo from Source SDK 2013. 2015-11-11 12:53:54 -05:00
Nicholas Hastings
c4237cc89c Update CUserCmd. 2015-09-18 15:26:24 -04:00
Nicholas Hastings
3ef91fcbb8 Update CTakeDamageInfo from 2013 sdk. 2014-02-28 13:58:24 -05:00
Nicholas Hastings
39c2727496 Update CTakeDamageInfo from 2013 sdk. 2013-10-06 10:54:58 -04:00
Nicholas Hastings
9d97b2976f Updated IGameSystem (bug 5627). 2013-02-25 09:32:39 -05:00
Nicholas Hastings
3da0d7919a Updated MAX_PLAYERS defines to the actual limits. 2013-02-14 08:21:47 -05:00
Nicholas Hastings
05c4724bd1 Updated EmitSound_t (bug 5376). 2013-02-14 08:21:16 -05:00
Nicholas Hastings
77b5b65e80 Added newest CTakeDamageInfo var to ctor. 2013-02-14 08:20:06 -05:00
Nicholas Hastings
12085c2ef3 Added missing new var to CTakeDamageInfo, fixing CMultiDamage. 2012-12-24 11:18:25 -05:00
Nicholas Hastings
2b684d874f Updated collisionproperty.h. 2012-10-29 21:53:07 -04:00
Nicholas Hastings
5ad032f350 Updated IGameMovement and ICollideable for today's engine update. 2012-08-15 23:30:41 +01:00
Nicholas Hastings
cb4f63f743 Touched up CTakeDamageInfo (bug 5084, r=DS). 2011-09-09 15:17:50 -04:00
Nicholas Hastings
998fd9a9e8 Added missing semicolon from changeset 0a26feca0527. 2011-08-29 12:51:31 -04:00
Nicholas Hastings
c52bee2f7c Added new penetrations var to CTakeDamageInfo (bug 5065, r=DS). 2011-08-22 15:49:30 -04:00
Nicholas Hastings
6447fb2fba Merge. 2011-05-24 18:48:45 -04:00
Nicholas Hastings
55958f6dbd Added missing var to end of CTakeDamageInfo (bug 4903, r=DS). 2011-05-24 18:48:00 -04:00
Scott Ehlert
3e7f7bdabd Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2. 2011-04-28 01:30:09 -05:00
Scott Ehlert
38d7df6bb1 Fixed a template error triggered by gcc 4.0.1 on Mac OS X (bug 4459). 2010-06-21 04:33:22 -05:00
Nicholas Hastings
066f9bd2a7 Fixed compiler error in server/enginecallback.h on Mac OS X (bug 4459). 2010-06-21 04:31:01 -05:00
Scott Ehlert
7daeca53eb Updated IPlayerInfo AGAIN. 2010-04-29 23:27:03 -04:00
Nicholas Hastings
cf926a50ae Updated CPlayerInfo in player.h (bug 4372). 2010-04-29 11:59:17 -04:00
Scott Ehlert
7ff7f366d5 Modified SDK for GCC 4.2 2008-09-15 02:50:57 -05:00
Scott Ehlert
055f5cd168 Added most recent version of unmodified HL2 SDK for Orange Box engine 2008-09-15 01:07:45 -05:00