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

NPC Component (WIP) #916

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e37329e
continue onReceive event calls if Recording component has failure
AmyrAhmady Apr 17, 2024
cc04361
create NPCs component
AmyrAhmady Oct 18, 2024
46759c4
create pawn scripting api for current NPC functions
AmyrAhmady Apr 17, 2024
7ad704a
force internal updates on position and rotation change
AmyrAhmady Apr 17, 2024
120955d
calculate travelled distance once
AmyrAhmady Apr 17, 2024
6edef7e
add NPC_StopMove
AmyrAhmady Apr 17, 2024
7e0f21d
restart npc move when pos or rot is reset
AmyrAhmady Apr 17, 2024
49e9b94
only start npc move if move type is valid
AmyrAhmady Apr 17, 2024
bc6c6eb
set internal rot and pos values during move to avoid recursion
AmyrAhmady Apr 17, 2024
a833cbb
use stopMove when npc move is finished
AmyrAhmady Apr 17, 2024
5b2078f
only send NPC foot sync if player is spawned
AmyrAhmady Apr 17, 2024
3f36a9f
use underscore suffixed class variables for NPC class
AmyrAhmady Apr 17, 2024
2ac25b2
fix formatting
AmyrAhmady Apr 17, 2024
39d97dd
rename npc connect events to entity create and destroy
AmyrAhmady Apr 20, 2024
0396713
mark to be destroyed npcs to be process next tick
AmyrAhmady Apr 20, 2024
c2213b5
destroy NPCs safely
AmyrAhmady Apr 20, 2024
e0dd2f7
use NPC ref instead of ptr in emulate functions
AmyrAhmady Apr 20, 2024
65c333a
store footSyncRate config value in npc component
AmyrAhmady Apr 23, 2024
b3cecb4
calculate estimated arrival time and use it to detect finish move
AmyrAhmady Apr 23, 2024
4f386f3
fix velocity calculation
AmyrAhmady Apr 23, 2024
d57501b
add NPC_SetFacingAngle and GetFacingAngle
AmyrAhmady Apr 23, 2024
d1c7818
another attempt to fix npc movements
AmyrAhmady Apr 24, 2024
690c8bf
add NPC_SetSkin
AmyrAhmady May 8, 2024
85dc27b
add streamed in check natives for NPCs
AmyrAhmady May 13, 2024
4097909
add NPC_GetAll native
AmyrAhmady May 13, 2024
63d2fac
npc interior natives
AmyrAhmady May 18, 2024
c3a9237
proper class variable initialization in constructor
AmyrAhmady May 18, 2024
8f7790a
add set/get velocity for NPCs
AmyrAhmady May 18, 2024
b5d527d
fix NPC_SetFacingAngle
AmyrAhmady Oct 18, 2024
564e565
add health, armour and animation natives
AmyrAhmady Oct 20, 2024
34e9e7d
validity check for setHealth and setArmour
AmyrAhmady Oct 20, 2024
ed73b1e
update SDK
AmyrAhmady Jan 28, 2025
2c00264
add set and get weapon
AmyrAhmady Jan 28, 2025
80d1ae5
add set and get ammo
AmyrAhmady Jan 29, 2025
245c997
add get and set weapon skill level
AmyrAhmady Jan 29, 2025
935b8dc
fix typo, wepaon to weapon
AmyrAhmady Jan 29, 2025
2210754
handle keys properly, add pawn functions for it
AmyrAhmady Jan 30, 2025
21f502c
handle death and damage, base of weapon stuff
AmyrAhmady Jan 30, 2025
4bf94be
fix formatting
AmyrAhmady Jan 30, 2025
6920a1c
fix getTickCount issue
AmyrAhmady Jan 30, 2025
a763ece
change damagerId to damager in onNPCTakeDamage
AmyrAhmady Jan 30, 2025
5e462c1
call pawn events
AmyrAhmady Jan 31, 2025
be4fb35
fix packet structure and ready for external usage too
AmyrAhmady Feb 1, 2025
5fda946
add melee attack functionality
AmyrAhmady Feb 1, 2025
488646c
fix typo in removeKey
AmyrAhmady Feb 1, 2025
4164bf9
add set and get fighting style
AmyrAhmady Feb 2, 2025
00c0103
a lot of wepaon and ammo stuff, weapon shot feature
AmyrAhmady Feb 3, 2025
54c4458
isDead :infinilul:
AmyrAhmady Feb 3, 2025
2e77462
fix build error on linux
AmyrAhmady Feb 3, 2025
dda02e2
fix formatting
AmyrAhmady Feb 3, 2025
38bfd8b
send bullet sync with NPC_Shoot
AmyrAhmady Feb 3, 2025
491614e
add pawn callback OnNPCGiveDamage
AmyrAhmady Feb 3, 2025
bbaa160
fix move stop issue, removes up key
AmyrAhmady Feb 4, 2025
2969574
add IsReloading and IsShooting
AmyrAhmady Feb 4, 2025
b79f747
add aiming feature and finish shooting mechanism
AmyrAhmady Feb 4, 2025
b000574
add npc.globalUpdareRate config
AmyrAhmady Feb 4, 2025
629aa4e
fix formatting
AmyrAhmady Feb 4, 2025
7463ba3
add aiming pawn natives
AmyrAhmady Feb 4, 2025
7a79654
fix NPC_AimAtPlayer definition
AmyrAhmady Feb 4, 2025
970eaa9
add OnNPCSpawn pawn callback
AmyrAhmady Feb 4, 2025
b55565b
fix typo and update time indicator issue
AmyrAhmady Feb 4, 2025
b29015b
set ipv6 to false for npcs
AmyrAhmady Feb 4, 2025
f4e9095
add set and get weapon accuracy
AmyrAhmady Feb 5, 2025
e1b2a63
add moveSpeed to npc move
AmyrAhmady Feb 5, 2025
bbe006d
check if npc is valid in damage callbacks
AmyrAhmady Feb 5, 2025
d035b35
enter and exit vehicle
AmyrAhmady Feb 7, 2025
d092f09
NPC_IsMoving, NPC_EnterVehicle, NPC_ExitVehicle
AmyrAhmady Feb 8, 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
1 change: 1 addition & 0 deletions Server/Components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_subdirectory(TextLabels)
add_subdirectory(Timers)
add_subdirectory(Variables)
add_subdirectory(Vehicles)
add_subdirectory(NPCs)

# Pawn
if(BUILD_PAWN_COMPONENT)
Expand Down
2 changes: 2 additions & 0 deletions Server/Components/NPCs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME)
add_server_component(${ProjectId})
Loading
Loading