mse / RSOD (public) (License: CC0 and other licenses) (since 2025-03-01) (hash sha1)
Free software FPS engine
List of commits:
Subject Hash Author Date (UTC)
Make static avatars killable 76f5731a518512057d7868e6c3f4d24825d74005 MSE 2024-06-22 03:26:48
Add support for weapon-dependent avatar prims 4b59a1911ce1f13caddfe187db737914491ba6fe MSE 2024-06-20 06:00:45
Hide FPS in non-debug builds 3994b75c7c8ccf67d8d9437582d2533fb4d13dc4 MSE 2024-06-19 04:45:32
De-hardcode data path for shaders 648b298f390f039c44f4f23aa8fdd2e5d2650df6 MSE 2024-06-16 19:01:24
Hide reserve ammo count when there is none 09c6e3131b04936949f1310e5fd15179b29c5c4f MSE 2024-06-12 23:02:55
Change rm -f to 6f4ab08d92f2c99975c7bfa63b3777b4e087af4e MSE 2024-06-12 22:13:28
Cleanup feb8a188b14d20819df87ae9ca4f67dec6be07ff MSE 2024-06-12 03:43:12
Allow setting mono font via init.json ba70f7a9da5ba2fcfe77d09a8d489de19dfb0061 MSE 2024-06-12 03:37:19
Add support for particle damage/impact ed57530ab69e9c32ac19c0c6a36cb6102791b7c6 MSE 2024-06-12 00:25:18
Add agent linear velocity to projectiles 2e254d93065e60a6e76dab321aa64aaad72dede7 MSE 2024-06-11 16:34:15
Add weapon particle support dc972a7f2cc0019d663b3284a1e49c3be313c74f MSE 2024-06-09 20:21:23
Initial commit c4f36c095752bd4e7090caf48320d041fb2328bb MSE 2024-06-09 02:33:29
Commit 76f5731a518512057d7868e6c3f4d24825d74005 - Make static avatars killable
Author: MSE
Author date (UTC): 2024-06-22 03:26
Committer name: MSE
Committer date (UTC): 2024-06-22 03:26
Parent(s): 4b59a1911ce1f13caddfe187db737914491ba6fe
Signer:
Signing key:
Signing status: N
Tree: baf165a6218af586378400107dcc4bcd61bdac09
File Lines added Lines deleted
src/fdungeon.cpp 10 7
src/rsod.cpp 1 1
File src/fdungeon.cpp changed (mode: 100644) (index 5e03c4b..882795b)
... ... Agent *Dungeon::addAgent( btVector3 position, btScalar mass, btScalar restitutio
1869 1869 a->angle = { 0.0, 0.0, 0.0 }; a->angle = { 0.0, 0.0, 0.0 };
1870 1870 a->scale = scale; a->scale = scale;
1871 1871 a->offsetYaw = 0.0; a->offsetYaw = 0.0;
1872 a->health = 100.0; // A good enough default as any.
1872 // Static agents are invincible unless health and maxHealth are set.
1873 a->health = isStatic ? 0.0 : 100.0;
1873 1874 a->maxHealth = a->health; a->maxHealth = a->health;
1874 1875 a->waterHealthRate = 0.0; a->waterHealthRate = 0.0;
1875 1876 a->mass = mass; a->mass = mass;
 
... ... Agent *Dungeon::rayImpact( Agent *a, std::pair<linalg::vec<double,3>,linalg::vec
3205 3206 if( atype == "agent" || atype == "spawn" ){ if( atype == "agent" || atype == "spawn" ){
3206 3207 // Ray hit an agent. // Ray hit an agent.
3207 3208 // TODO: Headshots, special damage zones, blood vertices, destroying static objects, etc. // TODO: Headshots, special damage zones, blood vertices, destroying static objects, etc.
3208 if( hitAgent != &defaultAgent
3209 && (hitAgent->type == TYPE_AGENT || hitAgent->type == TYPE_VEHICLE || hitAgent->type == TYPE_DYNAMIC) ){
3209 if( hitAgent != &defaultAgent ){
3210 3210 if( defenseSkill.length() > 0 && hitAgent->skills.size() > 0 ){ if( defenseSkill.length() > 0 && hitAgent->skills.size() > 0 ){
3211 3211 auto defense_skill_it = hitAgent->skills.find( defenseSkill ); auto defense_skill_it = hitAgent->skills.find( defenseSkill );
3212 3212 if( defense_skill_it != hitAgent->skills.end() ){ if( defense_skill_it != hitAgent->skills.end() ){
 
... ... void Dungeon::simulate( double maxDraw, double d, std::string defenseSkill ){
3901 3901 }else{ }else{
3902 3902 // Run AI. Remove agent if aiFrameCallback returns true. // Run AI. Remove agent if aiFrameCallback returns true.
3903 3903 if( (*aiFrameCallback)( agent_ptr, d ) ){ if( (*aiFrameCallback)( agent_ptr, d ) ){
3904 // Run the agent's death callback.
3905 if(portalCallback && agent_ptr->onDeath.length() > 0)
3906 (*portalCallback)( agent_ptr->onDeath );
3907 3904 // Flag the agent for removal and skip to the next agent. // Flag the agent for removal and skip to the next agent.
3908 3905 agent_ptr->health = 0.0; agent_ptr->health = 0.0;
3909 3906 agent_ptr = agent_ptr->next; agent_ptr = agent_ptr->next;
 
... ... void Dungeon::simulate( double maxDraw, double d, std::string defenseSkill ){
3934 3931 agent_ptr->rigidBody ? agent_ptr->rigidBody->getLinearVelocity() : btVector3(0,0,0); agent_ptr->rigidBody ? agent_ptr->rigidBody->getLinearVelocity() : btVector3(0,0,0);
3935 3932 double velHoriz = linalg::length(linalg::vec<double,2>(velVec.x(), velVec.z())); double velHoriz = linalg::length(linalg::vec<double,2>(velVec.x(), velVec.z()));
3936 3933 bool jumping = agent_ptr->type == TYPE_AGENT && agent_ptr->standing == 0.0; bool jumping = agent_ptr->type == TYPE_AGENT && agent_ptr->standing == 0.0;
3937 if( agent_ptr->health > 0.0 || agent_ptr->maxHealth <= 0.0 ){
3934 if( agent_ptr->health > 0.0 ){
3938 3935 auto fire_it = agent_ptr->avatar.bodyAnimations.find("stand_fire"); auto fire_it = agent_ptr->avatar.bodyAnimations.find("stand_fire");
3939 3936 if( fire_it != agent_ptr->avatar.bodyAnimations.end() if( fire_it != agent_ptr->avatar.bodyAnimations.end()
3940 3937 && agent_ptr->avatar.bodyFrame >= fire_it->second.x && agent_ptr->avatar.bodyFrame >= fire_it->second.x
 
... ... void Dungeon::simulate( double maxDraw, double d, std::string defenseSkill ){
3995 3992 Agent *a = agent_ptr->next; Agent *a = agent_ptr->next;
3996 3993 if(agent_ptr && agent_ptr != playerAgent if(agent_ptr && agent_ptr != playerAgent
3997 3994 && agent_ptr->health <= 0.0 && agent_ptr->maxHealth > 0.0){ && agent_ptr->health <= 0.0 && agent_ptr->maxHealth > 0.0){
3995 // Prevent this from triggering again by setting maxHealth negative.
3996 agent_ptr->maxHealth = -1.0;
3997 // Run the agent's death callback.
3998 if(portalCallback && agent_ptr->onDeath.length() > 0)
3999 (*portalCallback)( agent_ptr->onDeath );
4000 // Remove the agent from the world (though probably not completely from memory until next level load).
3998 4001 removeAgent( agent_ptr, true ); removeAgent( agent_ptr, true );
3999 4002 } }
4000 4003 agent_ptr = a; agent_ptr = a;
File src/rsod.cpp changed (mode: 100644) (index 3acb991..cb6486a)
... ... void FirstPersonLoop( double d ){
3780 3780 gaze_agent = a; gaze_agent = a;
3781 3781 gaze_name = gaze_name =
3782 3782 dungeon.getAgentLocalizedName( a, language ); dungeon.getAgentLocalizedName( a, language );
3783 if( a->type != fdungeon::TYPE_STATIC && a->health < a->maxHealth )
3783 if( a->health < a->maxHealth )
3784 3784 gaze_health_percent = std::min( a->health / a->maxHealth, 1.0 ) * 100.0; gaze_health_percent = std::min( a->health / a->maxHealth, 1.0 ) * 100.0;
3785 3785 if( gaze_result.second <= gaze_near ) if( gaze_result.second <= gaze_near )
3786 3786 gaze_reachable = true; gaze_reachable = true;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mse/RSOD

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mse/RSOD

Clone this repository using git:
git clone git://git.rocketgit.com/user/mse/RSOD

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main