diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 110111e6ca492084d47e8488d0a32138a9c66359..c3f4b589684658007dcc4e7d63a9b96a33e20c18 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
uses
g_basic, g_player, e_graphics, Classes, g_res_downloader,
- SysUtils, g_sound, g_gui, g_scripts, MAPSTRUCT, wadreader, md5;
+ SysUtils, g_sound, g_gui, MAPSTRUCT, wadreader, md5;
type
TGameSettings = record
g_Game_SetLoadingText(_lc[I_LOAD_MENUS], 0, False);
g_Menu_Init();
-
- g_Scripts_Init();
- g_Scripts_Load('game.conprint("Scripts Init")');
gMusic := TMusic.Create();
gMusic.SetByName('MUSIC_MENU');
@@ -1236,6 +1233,7 @@ procedure processPlayerControls (plr: TPlayer; var ctrl: TPlayerControl; var Mov
var
time: Word;
strafeDir: Byte;
+ i: Integer;
begin
if (plr = nil) then exit;
if (p2hack) then time := 1000 else time := 1;
begin
// new strafe mechanics
if (strafeDir = 0) then strafeDir := MoveButton; // start strafing
- // now set direction according to strafe
- if (strafeDir = 1) then plr.SetDirection(D_LEFT)
- else if (strafeDir = 2) then plr.SetDirection(D_RIGHT)
- else plr.SetDirection(TDirection(MoveButton-1));
+ // now set direction according to strafe (reversed)
+ if (strafeDir = 2) then plr.SetDirection(D_LEFT)
+ else if (strafeDir = 1) then plr.SetDirection(D_RIGHT);
end
else
begin
if isKeyPressed(KeyNextWeapon, KeyNextWeapon2) then plr.PressKey(KEY_NEXTWEAPON);
if isKeyPressed(KeyPrevWeapon, KeyPrevWeapon2) then plr.PressKey(KEY_PREVWEAPON);
if isKeyPressed(KeyOpen, KeyOpen2) then plr.PressKey(KEY_OPEN);
+
+ for i := 0 to High(KeyWeapon) do
+ if isKeyPressed(KeyWeapon[i], KeyWeapon2[i]) then
+ begin
+ plr.ForceWeapon(i);
+ Break;
+ end;
end;
end;