diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 06ae6e50340317cda52f96b1b34228d50c48f18c..98535cc9ef2f36220f98ba05b4cbb0a401598cac 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
procedure positionChanged (); inline; //WARNING! call this after entity position was changed, or coldet will not work right!
- property Obj: TObj read FObj;
+ function ObjPtr (): PObj; inline;
+
+ property Obj: TObj read FObj; // copies object
property State: Byte read FState;
property Mess: Boolean read FMess;
end;
if not (R_BERSERK in FRulez) then
begin
Include(FRulez, R_BERSERK);
- if FBFGFireCounter = -1 then
+ if gBerserkAutoswitch and (gDebugMode or gCheats) and (FBFGFireCounter = -1) then
begin
FCurrWeap := WEAPON_KASTET;
resetWeaponQueue();
FModel.SetWeapon(WEAPON_KASTET);
end;
if gFlash <> 0 then
+ begin
Inc(FPain, 100);
if gFlash = 2 then Inc(FPickup, 5);
+ end;
FBerserk := gTime+30000;
Result := True;
remove := True;
inherited;
end;
+function TCorpse.ObjPtr (): PObj; inline; begin result := @FObj; end;
+
procedure TCorpse.positionChanged (); inline; begin end;
procedure TCorpse.moveBy (dx, dy: Integer); inline;
FDifficult := TDifficult(p^);
end;
+
+begin
+ conRegVar('cheat_berserk_autoswitch', @gBerserkAutoswitch, 'autoswitch to fist when berserk pack taken', '', true, true);
end.