Skip to content

Commit

Permalink
add map
Browse files Browse the repository at this point in the history
  • Loading branch information
VadimDez committed May 9, 2019
1 parent 6c5c992 commit fb8dc5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h3>Create Server</h3>
<option value="cs_assault.bsp">cs_assault</option>
<option value="cs_italy.bsp">cs_italy</option>
<option value="de_aztec.bsp">de_aztec</option>
<option value="de_dust.bsp">de_dust</option>
<option value="de_dust2.bsp">de_dust2</option>
<option value="de_nuke.bsp">de_nuke</option>
<option value="de_inferno.bsp">de_inferno</option>
Expand Down
6 changes: 6 additions & 0 deletions src/Weapon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export class Weapon {
`cstrike/sprites/weapon_${spriteName}.txt`,
'text'
);
console.log(txt);

const lines = txt.split('\n');
// The last line is an empty string
let length = lines.length - 1;
Expand All @@ -124,8 +126,12 @@ export class Weapon {
};
}

console.log(this.sprite);

await this.renderHud();
await this.renderCrosshair();
console.log(this.crosshair);

// Download weapon model
const mdl = await download(
`cstrike/models/v_${this.weaponName}.mdl`,
Expand Down
2 changes: 1 addition & 1 deletion src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Menu {

static startGame() {
let main = new Main();
main.start(Menu.getMap());
main.start('de_dust2.bsp' || Menu.getMap());
}

static joinGame() {
Expand Down

0 comments on commit fb8dc5d

Please sign in to comment.