List of commits:
Subject Hash Author Date (UTC)
Wake player when hit b2bc7d9cb37a9c9a707e9b8428e6f4d3fa2f27b7 mse 2021-05-26 08:50:53
Minor clarifications d5a83695acdf78b21610239d530b1317dc4003cc mse 2021-05-24 00:11:59
DRM-free dynamic target c51ae66a80c38d4d8aec606ad04492ea12a56fcd mse 2021-05-23 23:53:32
Initial commit bfb7298e48367d2ac0924811b4950f3066ff075c mse 2021-05-22 05:08:16
Commit b2bc7d9cb37a9c9a707e9b8428e6f4d3fa2f27b7 - Wake player when hit
Author: mse
Author date (UTC): 2021-05-26 08:50
Committer name: mse
Committer date (UTC): 2021-05-26 08:50
Parent(s): d5a83695acdf78b21610239d530b1317dc4003cc
Signer:
Signing key:
Signing status: N
Tree: fced4d2491c6fdc641fe2b1e888827360885c191
File Lines added Lines deleted
confec.cpp 25 0
File confec.cpp changed (mode: 100644) (index 5581b7c..1a887bb)
... ... void UpdateInventoryService();
773 773
774 774 void ModUpload( std::string title ); void ModUpload( std::string title );
775 775
776 FILE *FileOpen( const char* filename, const char* modes );
777
776 778 void Render(); void Render();
777 779
778 780 void MakeGibs( double x, double y, linalg::vec<double,3> vel, int n ); void MakeGibs( double x, double y, linalg::vec<double,3> vel, int n );
 
... ... void DeleteAllUserFiles(){
2443 2445 remove( ( user_data_path + "/" + user_recipes ).c_str() ); remove( ( user_data_path + "/" + user_recipes ).c_str() );
2444 2446 } }
2445 2447
2448 // Called when a fighter hits something.
2446 2449 void HitCallback( fworld::Entity *ent_a, fworld::Entity *ent_b, int damage ){ void HitCallback( fworld::Entity *ent_a, fworld::Entity *ent_b, int damage ){
2450 if( ent_b->task == fworld::TASK_SLEEP ){
2451 // Wake the entity.
2452 ent_b->task = fworld::TASK_NONE;
2453 ent_b->stun = 0.0;
2454 if( world.followEntity >= 0 && world.followEntity < world.entities.size()
2455 && ent_b == &world.entities[world.followEntity] ){
2456 // The player is hit, so turn off sleep mode.
2457 sleep_mode = false;
2458 }
2459 }
2447 2460 MakeGibs( MakeGibs(
2448 2461 ent_b->x + 0.5, ent_b->x + 0.5,
2449 2462 ent_b->y + 1.0 - ent_b->height * 0.75 / world.tileSize, ent_b->y + 1.0 - ent_b->height * 0.75 / world.tileSize,
 
... ... void ModUpload( std::string title ){
4061 4074 #endif #endif
4062 4075 } }
4063 4076
4077 // fopen replacement that attempts to open the file from multiple locations.
4078 FILE *FileOpen( const char* filename, const char* modes ){
4079 // Check if filename starts with the base data path.
4080 std::string str_file = filename, str_data = data_path + "/";
4081 if( str_file.length() >= str_data.length()
4082 && str_file.substr( 0, str_data.length() ) == str_data ){
4083 // TODO: String replacement and iterate through mod paths.
4084 }
4085 // Fall back to open the path specified.
4086 return fopen( filename, modes );
4087 }
4088
4064 4089 void Render(){ void Render(){
4065 4090 double d = fgl::deltaTime(); double d = fgl::deltaTime();
4066 4091
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/ConfectionerEngine

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

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

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