index 3ddfd2c33192c7b0deedb35d9ea87aed7c4802af..e04405795493fda75933b7d211339e470ec91ad2 100644 (file)
(name: ''; x: 0; y: 0; w: 0; h: 0; anim: (loop: true; delay: 0; frames: 0; back: false)), // 5 CHAINGUN
(name: 'BROCKET'; x: 0; y: 0; w: 64; h: 32; anim: (loop: true; delay: 1; frames: 1; back: false)), // 6 ROCKETLAUNCHER
(name: 'BPLASMA'; x: 0; y: 0; w: 16; h: 16; anim: (loop: true; delay: 5; frames: 2; back: false)), // 7 PLASMA
- (name: 'BBFG'; x: 8; y: 8; w: 64; h: 64; anim: (loop: true; delay: 6; frames: 2; back: false)), // 8 BFG
+ (name: 'BBFG'; x: 6; y: 7; w: 64; h: 64; anim: (loop: true; delay: 6; frames: 2; back: false)), // 8 BFG
(name: ''; x: 0; y: 0; w: 0; h: 0; anim: (loop: true; delay: 0; frames: 0; back: false)), // 9 SUPERPULEMET
(name: 'FLAME'; x: 0; y: 0; w: 32; h: 32; anim: (loop: true; delay: 6; frames: 0{11}; back: false)), // 10 FLAMETHROWER
(name: ''; x: 0; y: 0; w: 0; h: 0; anim: (loop: true; delay: 0; frames: 0; back: false)), // 11
t := Items[it.ItemType].tex;
tex := t.GetTexture(Items[it.ItemType].frame);
r_Draw_TextureRepeat(tex, xx, yy, tex.width, tex.height, false, 255, 255, 255, 255, false);
- if DebugFrames then
+ if DebugFrames and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Draw_Rect(
xx + it.obj.rect.x, // it.obj.x + it.obj.rect.x,
da := mon.GameDirection;
r_Draw_MultiTextureRepeat(t, mon.DirAnim[a, da], false, xx + dx, yy + dy, t.width, t.height, flip, 255, 255, 255, 255, false);
end;
- if DebugFrames then
+ if DebugFrames and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Draw_Rect(
xx + mon.obj.rect.x, // mon.obj.x + mon.obj.rect.x,
0, 255, 0, 255
);
end;
- if DebugHealth and mon.alive then
+ if DebugHealth and mon.alive and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Common_DrawText(
IntToStr(mon.MonsterHealth),
end;
end;
+ procedure r_Map_DrawAim (p: TPlayer);
+ var x0, y0, x1, y1, a, len: Integer;
+ begin
+ ASSERT(p <> nil);
+ r_Common_GetPlayerPos(p, x0, y0);
+ x0 := x0 + WEAPONPOINT[p.Direction].X + IfThen(p.Direction = TDirection.D_LEFT, 7, -7);
+ y0 := y0 + WEAPONPOINT[p.Direction].Y;
+ a := p.Angle_;
+ len := 1024;
+ case p.CurrWeap of
+ WEAPON_KASTET: len := 12;
+ WEAPON_SAW: len := 24;
+ WEAPON_PISTOL, WEAPON_SHOTGUN1, WEAPON_SHOTGUN2, WEAPON_CHAINGUN,
+ WEAPON_ROCKETLAUNCHER, WEAPON_SUPERPULEMET, WEAPON_FLAMETHROWER:
+ begin
+ if a = ANGLE_RIGHTUP then DEC(a, 2);
+ if a = ANGLE_RIGHTDOWN then INC(a, 4);
+ if a = ANGLE_LEFTUP then INC(a, 2);
+ if a = ANGLE_LEFTDOWN then DEC(a, 4);
+ end;
+ WEAPON_PLASMA:
+ begin
+ if a = ANGLE_RIGHTUP then DEC(a, 1);
+ if a = ANGLE_RIGHTDOWN then INC(a, 3);
+ if a = ANGLE_LEFTUP then INC(a, 1);
+ if a = ANGLE_LEFTDOWN then DEC(a, 3);
+ end;
+ WEAPON_BFG:
+ begin
+ if a = ANGLE_RIGHTUP then DEC(a, 1);
+ if a = ANGLE_RIGHTDOWN then INC(a, 2);
+ if a = ANGLE_LEFTUP then INC(a, 1);
+ if a = ANGLE_LEFTDOWN then DEC(a, 2);
+ end;
+ end;
+ x1 := x0 + Trunc(Cos(-DegToRad(a)) * len);
+ y1 := y0 + Trunc(Sin(-DegToRad(a)) * len);
+ r_Draw_Line(x0, y0, x1, y1, 255, 0, 0, 158);
+ end;
+
procedure r_Map_DrawPlayer (p, drawed: TPlayer);
var x, y, ax, ay, w, h: Integer; b, flip: Boolean; t: TGLMultiTexture; tex: TGLTexture; alpha: Byte; count, frame: LongInt;
begin
r_Map_DrawPlayerModel(p.Model, x, y, alpha);
end;
- if DebugFrames then
+ if DebugFrames and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Draw_Rect(
x + p.obj.rect.x, // p.obj.x + p.obj.rect.x,
);
end;
- if DebugHealth and p.alive then
+ if DebugHealth and p.alive and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Common_DrawText(
IntToStr(p.health) + '/' + IntToStr(p.armor),
if (p.FMegaRulez[MR_INVIS] <= gTime) or ((drawed <> nil) and ((p = drawed) or (p.Team = drawed.Team) and (gGameSettings.GameMode <> GM_DM))) then
r_Map_DrawTalkBubble(p);
- // TODO draw aim
+ if gAimLine and p.alive and ((p = gPlayer1) or (p = gPlayer2)) then
+ r_Map_DrawAim(p);
end;
procedure r_Map_DrawPlayers (x, y, w, h: Integer; player: TPlayer);
g_Anim_GetFrameByTime(ShotAnim[typ].anim, (gTime - Shots[i].time) DIV GAME_TICK, count, frame);
tex := t.GetTexture(frame);
r_Draw_TextureRepeatRotate(tex, xx - ShotAnim[typ].x, yy - ShotAnim[typ].y, tex.width, tex.height, false, 255, 255, 255, 255, false, pX, pY, a);
- if DebugFrames then
+ if DebugFrames and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Draw_Rect(
xx + Shots[i].obj.rect.x, // Shots[i].obj.x + Shots[i].obj.rect.x,
t := FlagTextures[i];
tex := t.GetTexture(FlagFrame);
r_Draw_TextureRepeat(tex, xx + dx, yy + 1, tex.width, tex.height, flip, 255, 255, 255, 255, false);
- if DebugFrames then
+ if DebugFrames and not (gGameSettings.GameType in [GT_SERVER, GT_CLIENT]) then
begin
r_Draw_Rect(
xx + gFlags[i].obj.rect.x, // gFlags[i].obj.x + gFlags[i].obj.rect.x,
if gDrawBackGround and (SkyTexture <> nil) then
begin
r_Map_CalcSkyParallax(cx, cy, w, h, SkyTexture.width, SkyTexture.height, gMapInfo.Width, gMapInfo.Height, sx, sy, sw, sh);
+ r_Draw_SetFilter(SkyTexture, gTextureFilter);
r_Draw_Texture(SkyTexture, sx, sy, sw, sh, false, 255, 255, 255, 255, false);
end;