Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat melee weapon #226

Merged
merged 29 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e56ba27
chore: upload bat
IsaacThoman Jan 9, 2025
e6bb006
chore: removed useless code
AustinJMann Jan 9, 2025
fa2b8a7
Merge branch 'refs/heads/dev' into feat-melee-weapon
AustinJMann Jan 10, 2025
eaa9ff5
chore: added maxDistance argument to getShotVectorsToPlayersInChrosshair
AustinJMann Jan 10, 2025
0086034
feat: Added a baseball bat melee weapon.
AustinJMann Jan 10, 2025
d2de1be
fixed up stuff with bat.
AustinJMann Jan 13, 2025
ed69284
chore: imports and changed sphere type.
AustinJMann Jan 13, 2025
53d7225
bat stuff
AustinJMann Jan 13, 2025
abd89b1
new hit scan method and animation for bat
AustinJMann Jan 15, 2025
1d277e6
Merge branch 'dev' into feat-melee-weapon
AustinJMann Jan 15, 2025
68ea7a0
linting
AustinJMann Jan 15, 2025
4d55db0
types
AustinJMann Jan 15, 2025
9f1877b
damage
AustinJMann Jan 15, 2025
ba4f696
Infinity
AustinJMann Jan 15, 2025
563d305
added bat to map
AustinJMann Jan 15, 2025
a1a8e1c
linting
AustinJMann Jan 15, 2025
645f955
changed spawn locations of bat
AustinJMann Jan 15, 2025
b3615cc
better emojis in console log
AustinJMann Jan 15, 2025
4da2b4f
Merge branch 'dev' into feat-melee-weapon
AustinJMann Jan 17, 2025
3c31741
Merge branch 'dev' into feat-melee-weapon
AustinJMann Jan 23, 2025
4228aec
formating
AustinJMann Jan 23, 2025
13d0359
fix: bat is now a pipe
AustinJMann Jan 23, 2025
ebcda1c
fix: rotate flat on ground
AustinJMann Jan 23, 2025
c345086
removed random comments
AustinJMann Jan 23, 2025
2fca426
fix: model is now stylized
AustinJMann Jan 23, 2025
51e3d61
oops
AustinJMann Jan 23, 2025
0463330
fix: scale
AustinJMann Jan 23, 2025
761ede2
fix: scale
AustinJMann Jan 23, 2025
fa0a42e
Merge branch 'dev' into feat-melee-weapon
AustinJMann Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/rusty_pipe.blend
Binary file not shown.
305 changes: 166 additions & 139 deletions public/maps/crackhouse_1/map.json
Original file line number Diff line number Diff line change
@@ -1,140 +1,167 @@
{
"name": "crackhouse_1",
"respawnPoints": [
{
"position": {"x": 12, "y": 2, "z": -7.2},
"quaternion": {"x": 0, "y": 0.95, "z": 0, "w": 0.33}
},
{
"position": {"x": 12, "y": 2, "z": -11.2},
"quaternion": {"x": 0, "y": -1, "z": 0, "w": 0}
},
{
"position": {"x": 10.3, "y": 2, "z": -13.2},
"quaternion": {"x": 0, "y": -1, "z": 0, "w": 0}
},
{
"position": {"x": 8.6, "y": 2, "z": -11.6},
"quaternion": {"x": 0, "y": -1, "z": 0, "w": 0}
},
{
"position": {"x": 8.6, "y": 2, "z": -9.3},
"quaternion": {"x": 0, "y": -1, "z": 0, "w": 0}
},
{
"position": {"x": -6.87, "y": 4, "z": 13.27},
"quaternion": {"x": 0, "y": -0.87, "z": 0, "w": 0.5}
},
{
"position": {"x": 2.62, "y": 4.2, "z": 13.37},
"quaternion": {"x": 0, "y": 0.68, "z": 0, "w": 0.73}
},
{
"position": {"x": 1.86, "y": 4, "z": 11.54},
"quaternion": {"x": 0, "y": 0.95, "z": 0, "w": 0.29}
},
{
"position": {"x": -5.15, "y": 4, "z": 15.22},
"quaternion": {"x": 0, "y": -0.55, "z": 0, "w": 0.83}
},
{
"position": {"x":-8.08 , "y": 4, "z": 15.65},
"quaternion": {"x": 0, "y": -0.31, "z": 0, "w": 0.95}
}
],
"itemRespawnPoints": [
{
"position": {"x": 5.71, "y": 1.31, "z": -4.16},
"itemId": 1
},
{
"position": {"x": -0.22, "y": 1.05, "z": 4.48},
"itemId": 1
},
{
"position": {"x": -7.17, "y": 1.05, "z": 13.79},
"itemId": 1
},
{
"position": {"x": -6.79, "y": 1.05, "z": 4.31},
"itemId": 2
},
{
"position": {"x": -7.03, "y": 3.24, "z": 14.89},
"itemId": 2
},
{
"position": {"x": 4.71, "y": 3.24, "z": 10.77},
"itemId": 2
},
{
"position": {"x": 4.71, "y": 3.24, "z": 10.77},
"itemId": 1
},
{
"position": {"x": 3.38, "y": 3.24, "z": 4.12},
"itemId": 1
},
{
"position": {"x": 12.14, "y": 0.53, "z": 13.78},
"itemId": 1
},
{
"position": {"x": 23.68, "y": 0.45, "z": 14.57},
"itemId": 2
},
{
"position": {"x": 24.3, "y": 1.2, "z": -2.25},
"itemId": 2
},
{
"position": {"x": 0.5, "y": 0.83, "z": -10.2},
"itemId": 1
},
{
"position": {"x": -13.38, "y": 0.83, "z": -10.2},
"itemId": 1
},
{
"position": {"x": 3.68, "y": 1.05, "z": 4.08},
"itemId": 2
},
{
"position": {"x": -0.62, "y": 0.55, "z": 16.68},
"itemId": 2
},
{
"position": {"x": -0.62, "y": 0.55, "z": 16.68},
"itemId": 1
},
{
"position": {"x": -18.04, "y": 0.55, "z": 3.17},
"itemId": 1
},
{
"position": {"x": -13.9, "y": 0.76, "z": -3.94},
"itemId": 1
},
{
"position": {"x": -13.9, "y": 0.76, "z": -3.94},
"itemId": 2
},
{
"position": {"x": 6.83, "y": 0.55, "z": -13.59},
"itemId": 2
},
{
"position": {"x": -6.65, "y": 3.24, "z": 2.28},
"itemId": 2
},
{
"position": {"x": -4.71, "y": 3.24, "z": 10.22},
"itemId": 2
},
{
"position": {"x": -4.71, "y": 3.24, "z": 10.22},
"itemId": 1
}

]
}
"name": "crackhouse_1",
"respawnPoints": [
{
"position": { "x": 12, "y": 2, "z": -7.2 },
"quaternion": { "x": 0, "y": 0.95, "z": 0, "w": 0.33 }
},
{
"position": { "x": 12, "y": 2, "z": -11.2 },
"quaternion": { "x": 0, "y": -1, "z": 0, "w": 0 }
},
{
"position": { "x": 10.3, "y": 2, "z": -13.2 },
"quaternion": { "x": 0, "y": -1, "z": 0, "w": 0 }
},
{
"position": { "x": 8.6, "y": 2, "z": -11.6 },
"quaternion": { "x": 0, "y": -1, "z": 0, "w": 0 }
},
{
"position": { "x": 8.6, "y": 2, "z": -9.3 },
"quaternion": { "x": 0, "y": -1, "z": 0, "w": 0 }
},
{
"position": { "x": -6.87, "y": 4, "z": 13.27 },
"quaternion": { "x": 0, "y": -0.87, "z": 0, "w": 0.5 }
},
{
"position": { "x": 2.62, "y": 4.2, "z": 13.37 },
"quaternion": { "x": 0, "y": 0.68, "z": 0, "w": 0.73 }
},
{
"position": { "x": 1.86, "y": 4, "z": 11.54 },
"quaternion": { "x": 0, "y": 0.95, "z": 0, "w": 0.29 }
},
{
"position": { "x": -5.15, "y": 4, "z": 15.22 },
"quaternion": { "x": 0, "y": -0.55, "z": 0, "w": 0.83 }
},
{
"position": { "x": -8.08, "y": 4, "z": 15.65 },
"quaternion": { "x": 0, "y": -0.31, "z": 0, "w": 0.95 }
}
],
"itemRespawnPoints": [
{
"position": { "x": 5.71, "y": 1.31, "z": -4.16 },
"itemId": 1
},
{
"position": { "x": -0.22, "y": 1.05, "z": 4.48 },
"itemId": 1
},
{
"position": { "x": -7.17, "y": 1.05, "z": 13.79 },
"itemId": 1
},
{
"position": { "x": -6.79, "y": 1.05, "z": 4.31 },
"itemId": 2
},
{
"position": { "x": -7.03, "y": 3.24, "z": 14.89 },
"itemId": 2
},
{
"position": { "x": 4.71, "y": 3.24, "z": 10.77 },
"itemId": 2
},
{
"position": { "x": -6.79, "y": 1.05, "z": 4.31 },
"itemId": 3
},
{
"position": { "x": 4.71, "y": 3.24, "z": 10.77 },
"itemId": 1
},
{
"position": { "x": 3.38, "y": 3.24, "z": 4.12 },
"itemId": 1
},
{
"position": { "x": 12.14, "y": 0.53, "z": 13.78 },
"itemId": 1
},
{
"position": { "x": 23.68, "y": 0.45, "z": 14.57 },
"itemId": 2
},
{
"position": { "x": 24.3, "y": 1.2, "z": -2.25 },
"itemId": 2
},
{
"position": { "x": 23.68, "y": 0.45, "z": 14.57 },
"itemId": 3
},
{
"position": { "x": 24.3, "y": 1.2, "z": -2.25 },
"itemId": 3
},
{
"position": { "x": 0.5, "y": 0.83, "z": -10.2 },
"itemId": 1
},
{
"position": { "x": -13.38, "y": 0.83, "z": -10.2 },
"itemId": 1
},
{
"position": { "x": 3.68, "y": 1.05, "z": 4.08 },
"itemId": 2
},
{
"position": { "x": -0.62, "y": 0.55, "z": 16.68 },
"itemId": 2
},
{
"position": { "x": 3.68, "y": 1.05, "z": 4.08 },
"itemId": 3
},
{
"position": { "x": -0.62, "y": 0.55, "z": 16.68 },
"itemId": 3
},
{
"position": { "x": -0.62, "y": 0.55, "z": 16.68 },
"itemId": 1
},
{
"position": { "x": -18.04, "y": 0.55, "z": 3.17 },
"itemId": 1
},
{
"position": { "x": -13.9, "y": 0.76, "z": -3.94 },
"itemId": 1
},
{
"position": { "x": -13.9, "y": 0.76, "z": -3.94 },
"itemId": 2
},
{
"position": { "x": 6.83, "y": 0.55, "z": -13.59 },
"itemId": 2
},
{
"position": { "x": -13.9, "y": 0.76, "z": -3.94 },
"itemId": 3
},
{
"position": { "x": 6.83, "y": 0.55, "z": -13.59 },
"itemId": 3
},
{
"position": { "x": -6.65, "y": 3.24, "z": 2.28 },
"itemId": 2
},
{
"position": { "x": -4.71, "y": 3.24, "z": 10.22 },
"itemId": 2
},
{
"position": { "x": -4.71, "y": 3.24, "z": 10.22 },
"itemId": 1
}
]
}
Binary file added public/models/rusty_pipe.glb
Binary file not shown.
Binary file added public/models/simplified_rusty_pipe.glb
Binary file not shown.
6 changes: 6 additions & 0 deletions src/client/core/Inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Networking } from './Networking.ts';
import { ItemBase, ItemType } from '../items/ItemBase.ts';
import { FishGun } from '../items/FishGun.ts';
import { Player } from '../../shared/Player.ts';
import { Pipe } from '../items/Pipe.ts';
import { FlagItem } from '../items/FlagItem.ts';
export class Inventory {
private inventoryItems: ItemBase[] = [];
Expand Down Expand Up @@ -66,6 +67,11 @@ export class Inventory {
this.inventoryItems.push(fish);
break;
}
case 3: {
const bat = new Pipe(this.renderer, this.networking, i, ItemType.InventoryItem);
this.inventoryItems.push(bat);
break;
}
case 4: {
const flag = new FlagItem(this.renderer, i, ItemType.InventoryItem);
this.inventoryItems.push(flag);
Expand Down
3 changes: 3 additions & 0 deletions src/client/core/RemoteItemRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Renderer } from './Renderer.ts';
import { ItemBase, ItemType } from '../items/ItemBase.ts';
import { BananaGun } from '../items/BananaGun.ts';
import { FishGun } from '../items/FishGun.ts';
import { Pipe } from '../items/Pipe.ts';
import { FlagItem } from '../items/FlagItem.ts';

// Custom types
Expand Down Expand Up @@ -90,6 +91,8 @@ export class RemoteItemRenderer {
return new BananaGun(this.renderer, this.networking, 0, ItemType.WorldItem);
case 2:
return new FishGun(this.renderer, this.networking, 0, ItemType.WorldItem);
case 3:
return new Pipe(this.renderer, this.networking, 0, ItemType.WorldItem);
case 4:
return new FlagItem(this.renderer, 0, ItemType.WorldItem);
default:
Expand Down
Loading
Loading