Compare commits
11 Commits
offset-fix
...
61ea504f28
| Author | SHA1 | Date | |
|---|---|---|---|
| 61ea504f28 | |||
| bd8de00f10 | |||
| e6ca121b86 | |||
| 067fff4ef8 | |||
| 7bdc3fbaa3 | |||
| 30fcdde828 | |||
| 5e97135970 | |||
| 504d54bbeb | |||
| 235c3a6151 | |||
| f2824af426 | |||
| ec679b22cb |
@@ -13,7 +13,7 @@ Before you begin, install the necessary memflow plugins using memflowup from the
|
||||
The needed Plugins are `memflow-qemu` and `memflow-win32`
|
||||
|
||||
Clone the repo on your vm host:
|
||||
`git clone https://github.com/superyu1337/radarflow2.git`
|
||||
`git clone https://git.deadzone.lol/Wizzard/radarflow2-kvm.git`
|
||||
|
||||
Run radarflow:
|
||||
`cargo run --release`
|
||||
@@ -38,7 +38,7 @@ Check the dlopen documentation for all possible import paths.
|
||||
```
|
||||
|
||||
Clone the repo on your attacking pc:
|
||||
`git clone https://github.com/superyu1337/radarflow2.git`
|
||||
`git clone https://git.deadzone.lol/Wizzard/radarflow2-kvm.git`
|
||||
|
||||
Run radarflow:
|
||||
`cargo run --release -- --connector pcileech`
|
||||
|
||||
12
src/comms.rs
12
src/comms.rs
@@ -16,12 +16,18 @@ pub struct PlayerData {
|
||||
has_awp: bool,
|
||||
|
||||
#[serde(rename = "isScoped")]
|
||||
is_scoped: bool
|
||||
is_scoped: bool,
|
||||
|
||||
#[serde(rename = "playerName")]
|
||||
player_name: String,
|
||||
|
||||
#[serde(rename = "weaponId")]
|
||||
weapon_id: i16,
|
||||
}
|
||||
|
||||
impl PlayerData {
|
||||
pub fn new(pos: Vec3, yaw: f32, player_type: PlayerType, has_bomb: bool, has_awp: bool, is_scoped: bool) -> PlayerData {
|
||||
PlayerData { pos, yaw, player_type, has_bomb, has_awp, is_scoped }
|
||||
pub fn new(pos: Vec3, yaw: f32, player_type: PlayerType, has_bomb: bool, has_awp: bool, is_scoped: bool, player_name: String, weapon_id: i16) -> PlayerData {
|
||||
PlayerData { pos, yaw, player_type, has_bomb, has_awp, is_scoped, player_name, weapon_id }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ impl DmaCtx {
|
||||
let mut team = 0i32;
|
||||
let mut clipping_weapon = 0u64;
|
||||
let mut is_scoped = 0u8;
|
||||
let mut player_name_ptr = 0u64;
|
||||
|
||||
{
|
||||
let mut batcher = MemoryViewBatcher::new(&mut self.process);
|
||||
@@ -106,18 +107,33 @@ impl DmaCtx {
|
||||
batcher.read_into(controller + cs2dumper::client::C_BaseEntity::m_iTeamNum, &mut team);
|
||||
batcher.read_into(pawn + cs2dumper::client::C_CSPlayerPawnBase::m_pClippingWeapon, &mut clipping_weapon);
|
||||
batcher.read_into(pawn + cs2dumper::client::C_CSPlayerPawn::m_bIsScoped, &mut is_scoped);
|
||||
batcher.read_into(controller + cs2dumper::client::CCSPlayerController::m_sSanitizedPlayerName, &mut player_name_ptr);
|
||||
}
|
||||
|
||||
let player_name = if player_name_ptr != 0 {
|
||||
let mut name_buffer = [0u8; 32];
|
||||
self.process.read_raw_into(player_name_ptr.into(), &mut name_buffer)?;
|
||||
|
||||
let name_len = name_buffer.iter().position(|&c| c == 0).unwrap_or(name_buffer.len());
|
||||
String::from_utf8_lossy(&name_buffer[..name_len]).to_string()
|
||||
} else {
|
||||
match team {
|
||||
2 => format!("T Player"),
|
||||
3 => format!("CT Player"),
|
||||
_ => format!("Unknown Player"),
|
||||
}
|
||||
};
|
||||
|
||||
let team = TeamID::from_i32(team);
|
||||
|
||||
let has_awp = {
|
||||
let (has_awp, weapon_id) = {
|
||||
let clipping_weapon: Address = clipping_weapon.into();
|
||||
let items_def_idx_addr = clipping_weapon + cs2dumper::client::C_EconEntity::m_AttributeManager
|
||||
+ cs2dumper::client::C_AttributeContainer::m_Item + cs2dumper::client::C_EconItemView::m_iItemDefinitionIndex;
|
||||
|
||||
let items_def_idx: i16 = self.process.read(items_def_idx_addr)?;
|
||||
|
||||
items_def_idx == 9
|
||||
(items_def_idx == 9, items_def_idx)
|
||||
};
|
||||
|
||||
Ok(BatchedPlayerData {
|
||||
@@ -126,7 +142,9 @@ impl DmaCtx {
|
||||
team,
|
||||
health,
|
||||
has_awp,
|
||||
is_scoped: is_scoped != 0
|
||||
is_scoped: is_scoped != 0,
|
||||
player_name,
|
||||
weapon_id,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -252,4 +270,6 @@ pub struct BatchedPlayerData {
|
||||
pub health: u32,
|
||||
pub has_awp: bool,
|
||||
pub is_scoped: bool,
|
||||
pub player_name: String,
|
||||
pub weapon_id: i16,
|
||||
}
|
||||
@@ -165,7 +165,9 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
|
||||
PlayerType::Local,
|
||||
has_bomb,
|
||||
local_data.has_awp,
|
||||
local_data.is_scoped
|
||||
local_data.is_scoped,
|
||||
local_data.player_name,
|
||||
local_data.weapon_id
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -202,7 +204,9 @@ pub async fn run(radar_data: ArcRwlockRadarData, connector: Connector, pcileech_
|
||||
player_type,
|
||||
has_bomb,
|
||||
player_data.has_awp,
|
||||
player_data.is_scoped
|
||||
player_data.is_scoped,
|
||||
player_data.player_name,
|
||||
player_data.weapon_id
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -169,7 +169,7 @@ impl CsData {
|
||||
{
|
||||
// Globals
|
||||
let tick_count_addr = (self.globals + 0x40).into();
|
||||
let map_addr = (self.globals + 0x1B8).into();
|
||||
let map_addr = (self.globals + 384).into();
|
||||
|
||||
// Gamerules
|
||||
let bomb_dropped_addr = (self.gamerules + cs2dumper::client::C_CSGameRules::m_bBombDropped as u64).into();
|
||||
|
||||
BIN
webradar/assets/image/background.png
Normal file
BIN
webradar/assets/image/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 MiB |
@@ -18,6 +18,14 @@
|
||||
<input type="checkbox" onclick="toggleStats()" id="statsCheck" name="stats"/>
|
||||
<label for="statsCheck">Stats</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" onclick="toggleNames()" id="namesCheck" name="names"/>
|
||||
<label for="namesCheck">Player Names</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" onclick="toggleGuns()" id="gunsCheck" name="guns"/>
|
||||
<label for="gunsCheck">Weapons</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
@@ -6,8 +6,11 @@ const bombColor = "#eda338"
|
||||
const textColor = "#d1d1d1"
|
||||
|
||||
// Settings
|
||||
shouldZoom = true
|
||||
drawStats = false
|
||||
shouldZoom = false
|
||||
|
||||
drawStats = true
|
||||
drawNames = true
|
||||
drawGuns = true
|
||||
|
||||
// Common
|
||||
canvas = null
|
||||
@@ -28,6 +31,53 @@ zoomSet = false
|
||||
safetyBound = 50
|
||||
boundingRect = null
|
||||
|
||||
// Weapon IDs
|
||||
const weaponIdMap = {
|
||||
1: "DEAGLE",
|
||||
2: "DUALIES",
|
||||
3: "FIVE-SEVEN",
|
||||
4: "GLOCK",
|
||||
7: "AK-47",
|
||||
8: "AUG",
|
||||
9: "AWP",
|
||||
10: "FAMAS",
|
||||
11: "G3SG1",
|
||||
13: "GALIL",
|
||||
14: "M249",
|
||||
16: "M4A4",
|
||||
17: "MAC-10",
|
||||
19: "P90",
|
||||
23: "MP5",
|
||||
24: "UMP",
|
||||
25: "XM1014",
|
||||
26: "BIZON",
|
||||
27: "MAG-7",
|
||||
28: "NEGEV",
|
||||
29: "SAWED-OFF",
|
||||
30: "TEC-9",
|
||||
31: "ZEUS",
|
||||
32: "P2000",
|
||||
33: "MP7",
|
||||
34: "MP9",
|
||||
35: "NOVA",
|
||||
36: "P250",
|
||||
38: "SCAR-20",
|
||||
39: "SG 553",
|
||||
40: "SCOUT",
|
||||
60: "M4A1-S",
|
||||
61: "USP-S",
|
||||
63: "CZ75",
|
||||
64: "REVOLVER",
|
||||
43: "FLASH",
|
||||
44: "HE",
|
||||
45: "SMOKE",
|
||||
46: "MOLOTOV",
|
||||
47: "DECOY",
|
||||
48: "INCENDIARY",
|
||||
49: "C4",
|
||||
0: "KNIFE"
|
||||
};
|
||||
|
||||
// networking
|
||||
websocket = null
|
||||
if (location.protocol == 'https:') {
|
||||
@@ -39,7 +89,7 @@ if (location.protocol == 'https:') {
|
||||
|
||||
// Util functions
|
||||
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
||||
const degreesToRadians = (degrees) => degrees * (Math.PI/180);
|
||||
const degreesToRadians = (degrees) => degrees * (Math.PI / 180);
|
||||
function makeBoundingRect(x1, y1, x2, y2, aspectRatio) {
|
||||
const topLeftX = x1;
|
||||
const topLeftY = y1;
|
||||
@@ -92,7 +142,7 @@ function boundingCoordinates(coordinates, boundingRect) {
|
||||
const newX = (coordinates.x - boundingRect.x) / xScale;
|
||||
const newY = (coordinates.y - boundingRect.y) / yScale;
|
||||
|
||||
return {x: newX, y: newY};
|
||||
return { x: newX, y: newY };
|
||||
}
|
||||
|
||||
function boundingScale(value, boundingRect) {
|
||||
@@ -107,7 +157,113 @@ function mapCoordinates(coordinates) {
|
||||
offset_x /= map.scale;
|
||||
offset_y /= -map.scale;
|
||||
|
||||
return {x: offset_x, y: offset_y}
|
||||
return { x: offset_x, y: offset_y }
|
||||
}
|
||||
|
||||
function drawPlayerBomb(pos, playerType) {
|
||||
if (!map) return;
|
||||
|
||||
if (zoomSet) {
|
||||
pos = boundingCoordinates(mapCoordinates(pos), boundingRect);
|
||||
textSize = boundingScale(10, boundingRect);
|
||||
} else {
|
||||
pos = mapCoordinates(pos);
|
||||
textSize = 10;
|
||||
}
|
||||
|
||||
const textY = pos.y + (drawNames ? (drawGuns ? 50 : 35) : (drawGuns ? 35 : 20));
|
||||
|
||||
ctx.fillStyle = bombColor;
|
||||
|
||||
ctx.font = `${textSize}px Arial`;
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = "black";
|
||||
ctx.strokeText("[C4]", pos.x, textY);
|
||||
ctx.fillText("[C4]", pos.x, textY);
|
||||
}
|
||||
|
||||
function drawPlayerName(pos, playerName, playerType, hasAwp, hasBomb, isScoped) {
|
||||
if (!map) return;
|
||||
|
||||
if (zoomSet) {
|
||||
pos = boundingCoordinates(mapCoordinates(pos), boundingRect);
|
||||
textSize = boundingScale(12, boundingRect);
|
||||
} else {
|
||||
pos = mapCoordinates(pos);
|
||||
textSize = 12;
|
||||
}
|
||||
|
||||
const textY = pos.y + 20;
|
||||
|
||||
let displayName = playerName;
|
||||
if (playerType === "Local") {
|
||||
displayName = "YOU";
|
||||
ctx.fillStyle = localColor;
|
||||
} else if (playerType === "Team") {
|
||||
ctx.fillStyle = teamColor;
|
||||
} else if (playerType === "Enemy") {
|
||||
ctx.fillStyle = enemyColor;
|
||||
}
|
||||
|
||||
if (isScoped) {
|
||||
displayName += " [SCOPED]";
|
||||
}
|
||||
|
||||
ctx.font = `${textSize}px Arial`;
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = "black";
|
||||
ctx.strokeText(displayName, pos.x, textY);
|
||||
|
||||
ctx.fillText(displayName, pos.x, textY);
|
||||
}
|
||||
|
||||
function getWeaponName(weaponId) {
|
||||
if (weaponIdMap[weaponId]) {
|
||||
return weaponIdMap[weaponId];
|
||||
}
|
||||
|
||||
if (weaponId >= 500) {
|
||||
return "KNIFE";
|
||||
}
|
||||
|
||||
return "WEAPON";
|
||||
}
|
||||
|
||||
function drawPlayerWeapon(pos, playerType, weaponId) {
|
||||
if (!map) return;
|
||||
|
||||
if (zoomSet) {
|
||||
pos = boundingCoordinates(mapCoordinates(pos), boundingRect);
|
||||
textSize = boundingScale(10, boundingRect);
|
||||
} else {
|
||||
pos = mapCoordinates(pos);
|
||||
textSize = 10;
|
||||
}
|
||||
|
||||
const textY = pos.y + (drawNames ? 35 : 20);
|
||||
|
||||
let weaponName = getWeaponName(weaponId);
|
||||
|
||||
if (weaponId === 9) {
|
||||
ctx.fillStyle = "orange";
|
||||
} else {
|
||||
ctx.fillStyle = textColor;
|
||||
}
|
||||
|
||||
ctx.font = `${textSize}px Arial`;
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = "black";
|
||||
ctx.strokeText(`[${weaponName}]`, pos.x, textY);
|
||||
ctx.fillText(`[${weaponName}]`, pos.x, textY);
|
||||
}
|
||||
|
||||
function render() {
|
||||
@@ -139,8 +295,7 @@ function render() {
|
||||
maxY = Math.max(maxY, mapCords.y);
|
||||
});
|
||||
|
||||
|
||||
boundingRect = makeBoundingRect(minX-safetyBound, minY-safetyBound, maxX+safetyBound, maxY+safetyBound, image.width/image.height)
|
||||
boundingRect = makeBoundingRect(minX - safetyBound, minY - safetyBound, maxX + safetyBound, maxY + safetyBound, image.width / image.height)
|
||||
|
||||
zoomSet = true
|
||||
} else if (zoomSet) {
|
||||
@@ -175,7 +330,33 @@ function render() {
|
||||
data.Player.hasAwp,
|
||||
data.Player.playerType,
|
||||
data.Player.isScoped
|
||||
)
|
||||
);
|
||||
|
||||
if (drawNames && !data.Player.isDormant) {
|
||||
drawPlayerName(
|
||||
data.Player.pos,
|
||||
data.Player.playerName,
|
||||
data.Player.playerType,
|
||||
data.Player.hasAwp,
|
||||
data.Player.hasBomb,
|
||||
data.Player.isScoped
|
||||
);
|
||||
}
|
||||
|
||||
if (drawGuns && !data.Player.isDormant) {
|
||||
drawPlayerWeapon(
|
||||
data.Player.pos,
|
||||
data.Player.playerType,
|
||||
data.Player.weaponId
|
||||
);
|
||||
}
|
||||
|
||||
if (data.Player.hasBomb && !data.Player.isDormant) {
|
||||
drawPlayerBomb(
|
||||
data.Player.pos,
|
||||
data.Player.playerType
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -183,7 +364,7 @@ function render() {
|
||||
if (radarData != null) {
|
||||
if (radarData.bombPlanted && !radarData.bombExploded && radarData.bombDefuseTimeleft >= 0) {
|
||||
|
||||
let maxWidth = 1024-128-128;
|
||||
let maxWidth = 1024 - 128 - 128;
|
||||
let timeleft = radarData.bombDefuseTimeleft;
|
||||
|
||||
// Base bar
|
||||
@@ -201,13 +382,13 @@ function render() {
|
||||
ctx.fillStyle = bombColor
|
||||
}
|
||||
|
||||
ctx.fillRect(130, 18, (maxWidth-2) * (timeleft / 40), 12)
|
||||
ctx.fillRect(130, 18, (maxWidth - 2) * (timeleft / 40), 12)
|
||||
|
||||
ctx.font = "24px Arial";
|
||||
ctx.textAlign = "center"
|
||||
ctx.textBaseline = "middle"
|
||||
ctx.fillStyle = textColor
|
||||
ctx.fillText(`${timeleft.toFixed(1)}s`, 1024/2, 28+24);
|
||||
ctx.fillText(`${timeleft.toFixed(1)}s`, 1024 / 2, 28 + 24);
|
||||
|
||||
// Defuse time lines
|
||||
ctx.strokeStyle = "black"
|
||||
@@ -221,8 +402,8 @@ function render() {
|
||||
|
||||
// Normal defuse
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(130 + (maxWidth-2) * (10 / 40), 16)
|
||||
ctx.lineTo(130 + (maxWidth-2) * (10 / 40), 32)
|
||||
ctx.moveTo(130 + (maxWidth - 2) * (10 / 40), 16)
|
||||
ctx.lineTo(130 + (maxWidth - 2) * (10 / 40), 32)
|
||||
ctx.stroke()
|
||||
|
||||
// Defuse stamp line
|
||||
@@ -230,8 +411,8 @@ function render() {
|
||||
console.log(radarData.bombDefuseEnd)
|
||||
ctx.strokeStyle = "green"
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(130 + (maxWidth-2) * (radarData.bombDefuseEnd / 40), 16)
|
||||
ctx.lineTo(130 + (maxWidth-2) * (radarData.bombDefuseEnd / 40), 32)
|
||||
ctx.moveTo(130 + (maxWidth - 2) * (radarData.bombDefuseEnd / 40), 16)
|
||||
ctx.lineTo(130 + (maxWidth - 2) * (radarData.bombDefuseEnd / 40), 32)
|
||||
ctx.stroke()
|
||||
}
|
||||
}
|
||||
@@ -243,12 +424,12 @@ function render() {
|
||||
ctx.textAlign = "center"
|
||||
ctx.textBaseline = "middle"
|
||||
ctx.fillStyle = textColor
|
||||
ctx.fillText("Not on a server", 1024/2, 1024/2);
|
||||
ctx.fillText("Not on a server", 1024 / 2, 1024 / 2);
|
||||
} else {
|
||||
ctx.font = "100px Arial";
|
||||
ctx.textAlign = "center"
|
||||
ctx.fillStyle = textColor
|
||||
ctx.fillText("Disconnected", 1024/2, 1024/2);
|
||||
ctx.fillText("Disconnected", 1024 / 2, 1024 / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,26 +471,39 @@ function drawBomb(pos, planted) {
|
||||
|
||||
if (zoomSet) {
|
||||
pos = boundingCoordinates(mapCoordinates(pos), boundingRect)
|
||||
size = boundingScale(5, boundingRect);
|
||||
size = boundingScale(8, boundingRect);
|
||||
} else {
|
||||
pos = mapCoordinates(pos)
|
||||
size = 5
|
||||
size = 8
|
||||
}
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(pos.x, pos.y, size, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = bombColor;
|
||||
ctx.fill();
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = "black";
|
||||
ctx.stroke();
|
||||
|
||||
ctx.font = size * 1.2 + "px Arial";
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "middle";
|
||||
ctx.fillStyle = "white";
|
||||
ctx.fillText("C4", pos.x, pos.y);
|
||||
|
||||
ctx.closePath();
|
||||
|
||||
if (planted && ((new Date().getTime() / 1000) % 1) > 0.5) {
|
||||
ctx.strokeStyle = enemyColor
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke()
|
||||
ctx.lineWidth = 3;
|
||||
ctx.beginPath();
|
||||
ctx.arc(pos.x, pos.y, size + 4, 0, 2 * Math.PI);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
function drawEntity(pos, fillStyle, dormant, hasBomb, yaw, hasAwp, playerType, isScoped) {
|
||||
function drawEntity(pos, fillStyle, dormant, hasBomb, yaw, hasAwp, playerType, isScoped, playerName) {
|
||||
if (map == null)
|
||||
return
|
||||
|
||||
@@ -362,14 +556,6 @@ function drawEntity(pos, fillStyle, dormant, hasBomb, yaw, hasAwp, playerType, i
|
||||
ctx.fill();
|
||||
}
|
||||
|
||||
if (hasBomb) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(pos.x, pos.y, circleRadius / 2, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = bombColor;
|
||||
ctx.fill();
|
||||
}
|
||||
|
||||
|
||||
ctx.closePath();
|
||||
|
||||
// Calculate arrowhead points
|
||||
@@ -385,9 +571,9 @@ function drawEntity(pos, fillStyle, dormant, hasBomb, yaw, hasAwp, playerType, i
|
||||
const arrowCornerY2 = pos.y - distance * Math.sin((yaw + arrowWidth) * (Math.PI / 180))
|
||||
|
||||
|
||||
const cicleYaw = 90-yaw
|
||||
const startAngle = degreesToRadians(cicleYaw-arrowWidth)-Math.PI/2
|
||||
const endAngle = degreesToRadians(cicleYaw+arrowWidth)-Math.PI/2
|
||||
const cicleYaw = 90 - yaw
|
||||
const startAngle = degreesToRadians(cicleYaw - arrowWidth) - Math.PI / 2
|
||||
const endAngle = degreesToRadians(cicleYaw + arrowWidth) - Math.PI / 2
|
||||
|
||||
// Draw arrow
|
||||
|
||||
@@ -502,7 +688,7 @@ function connect() {
|
||||
websocket = null
|
||||
unloadMap()
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
connect();
|
||||
}, 1000);
|
||||
};
|
||||
@@ -520,8 +706,10 @@ function connect() {
|
||||
}
|
||||
|
||||
addEventListener("DOMContentLoaded", (e) => {
|
||||
document.getElementById("zoomCheck").checked = true;
|
||||
|
||||
document.getElementById("zoomCheck").checked = false;
|
||||
document.getElementById("statsCheck").checked = true;
|
||||
document.getElementById("namesCheck").checked = true;
|
||||
document.getElementById("gunsCheck").checked = true;
|
||||
|
||||
canvas = document.getElementById('canvas');
|
||||
canvas.width = 1024;
|
||||
@@ -540,3 +728,11 @@ function toggleZoom() {
|
||||
function toggleStats() {
|
||||
drawStats = !drawStats
|
||||
}
|
||||
|
||||
function toggleNames() {
|
||||
drawNames = !drawNames
|
||||
}
|
||||
|
||||
function toggleGuns() {
|
||||
drawGuns = !drawGuns
|
||||
}
|
||||
@@ -6,6 +6,9 @@ body {
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
background-color: #000000; /* Change the background color as needed */
|
||||
background-image: url('assets/image/background.png');
|
||||
background-repeat: repeat;
|
||||
background-size: 128px 128px;
|
||||
}
|
||||
|
||||
#canvasContainer {
|
||||
@@ -23,12 +26,27 @@ canvas {
|
||||
}
|
||||
|
||||
#settingsHolder {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
top: inherit;
|
||||
left: inherit;
|
||||
width: inherit;
|
||||
height: 20%;
|
||||
visibility: visible;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
transform: translateY(-50%);
|
||||
width: auto;
|
||||
height: auto;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#settingsHolder .settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
color: white;
|
||||
visibility: visible;
|
||||
opacity: 0.8;
|
||||
padding: 10px;
|
||||
background-color: rgba(25, 25, 25, 0.7);
|
||||
border-radius: 5px;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
#settingsHolder:hover .settings {
|
||||
|
||||
Reference in New Issue
Block a user