Merge pull request #1 from htmlboss/master

Upgrade to VS 2017
This commit is contained in:
Walter Julius Hennecke 2018-11-05 08:28:33 +01:00 committed by GitHub
commit 012da92901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 535 additions and 533 deletions

View File

@ -1,6 +1,6 @@
EF2GameSource EF2GameSource
============= =============
The original EF2GameSource updated so it compiles under Visual Studio 2012 and Linux The original EF2GameSource updated so it compiles under Visual Studio 2017 and Linux
Also see original readme.txt Also see original readme.txt

View File

@ -14,6 +14,7 @@
* *
*****************************************************************************/ *****************************************************************************/
#include <cmath>
#include "g_local.h" #include "g_local.h"
#include "q_shared.h" #include "q_shared.h"
@ -767,7 +768,7 @@ void BotChangeViewAngles(bot_state_t *bs, float thinktime) {
// //
if (bot_challenge.integer) { if (bot_challenge.integer) {
//smooth slowdown view model //smooth slowdown view model
diff = abs(AngleDifference(bs->viewangles[i], bs->ideal_viewangles[i])); diff = std::fabs(AngleDifference(bs->viewangles[i], bs->ideal_viewangles[i]));
anglespeed = diff * factor; anglespeed = diff * factor;
if (anglespeed > maxchange) anglespeed = maxchange; if (anglespeed > maxchange) anglespeed = maxchange;
bs->viewangles[i] = BotChangeViewAngle(bs->viewangles[i], bs->viewangles[i] = BotChangeViewAngle(bs->viewangles[i],
@ -871,7 +872,7 @@ void BotInputToUserCommand(bot_input_t *bi, usercmd_t *ucmd, int delta_angles[3]
//set the view independent movement //set the view independent movement
ucmd->forwardmove = (signed char) (DotProduct(forward, bi->dir) * bi->speed); ucmd->forwardmove = (signed char) (DotProduct(forward, bi->dir) * bi->speed);
ucmd->rightmove = (signed char) (0 - DotProduct(right, bi->dir) * bi->speed); ucmd->rightmove = (signed char) (0 - DotProduct(right, bi->dir) * bi->speed);
ucmd->upmove = (signed char) (abs(forward[2]) * bi->dir[2] * bi->speed); ucmd->upmove = (signed char) (std::fabs(forward[2]) * bi->dir[2] * bi->speed);
//normal keyboard movement //normal keyboard movement
if (bi->actionflags & ACTION_MOVEFORWARD) ucmd->forwardmove += 127; if (bi->actionflags & ACTION_MOVEFORWARD) ucmd->forwardmove += 127;
if (bi->actionflags & ACTION_MOVEBACK) ucmd->forwardmove -= 127; if (bi->actionflags & ACTION_MOVEBACK) ucmd->forwardmove -= 127;

View File

@ -246,7 +246,7 @@ void BotSayTeamOrderAlways(bot_state_t *bs, int toclient) {
//don't show the message just put it in the console message queue //don't show the message just put it in the console message queue
gi.BotGetChatMessage(bs->cs, buf, sizeof(buf)); gi.BotGetChatMessage(bs->cs, buf, sizeof(buf));
ClientName(bs->client, name, sizeof(name)); ClientName(bs->client, name, sizeof(name));
Com_sprintf(teamchat, sizeof(teamchat), EC"(%s"EC")"EC": %s", name, buf); Com_sprintf(teamchat, sizeof(teamchat), EC"(%s" EC ")" EC ": %s", name, buf);
gi.BotQueueConsoleMessage(bs->cs, CMS_CHAT, teamchat); gi.BotQueueConsoleMessage(bs->cs, CMS_CHAT, teamchat);
} }
else { else {

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@ -30,41 +30,42 @@
<SccProjectName>"$/EF2/game", FYHAAAAA</SccProjectName> <SccProjectName>"$/EF2/game", FYHAAAAA</SccProjectName>
<SccLocalPath>.</SccLocalPath> <SccLocalPath>.</SccLocalPath>
<ProjectGuid>{AD2B91AF-BE5E-4D64-952C-5F061241380D}</ProjectGuid> <ProjectGuid>{AD2B91AF-BE5E-4D64-952C-5F061241380D}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Demo Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Demo Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release CDROM|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release CDROM|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Intel Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Intel Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset> <PlatformToolset>v141</PlatformToolset>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>