Skip to content

Commit

Permalink
Fixed a ton of bugs and added optional experimental changes
Browse files Browse the repository at this point in the history
  • Loading branch information
milesthenerd committed Nov 22, 2021
1 parent d434594 commit d7becb8
Show file tree
Hide file tree
Showing 22 changed files with 143 additions and 57 deletions.
6 changes: 3 additions & 3 deletions Configs/Default.config.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<option_android_build_version>2</option_android_build_version>
<option_android_color_depth>1</option_android_color_depth>
<option_android_compile_sdk_version>28</option_android_compile_sdk_version>
<option_android_display_name>Multitroid 1.4.1</option_android_display_name>
<option_android_display_name>Multitroid 1.4.2</option_android_display_name>
<option_android_facebook_app_display_name></option_android_facebook_app_display_name>
<option_android_facebook_appid></option_android_facebook_appid>
<option_android_facebook_enable>0</option_android_facebook_enable>
Expand Down Expand Up @@ -220,7 +220,7 @@
<option_changeresolution>false</option_changeresolution>
<option_closeesc>true</option_closeesc>
<option_colordepth>0</option_colordepth>
<option_display_name>AM2R Multitroid 1.4.1</option_display_name>
<option_display_name>AM2R Multitroid 1.4.2</option_display_name>
<option_displayerrors>True</option_displayerrors>
<option_ecma>0</option_ecma>
<option_facebook_app_display_name></option_facebook_app_display_name>
Expand Down Expand Up @@ -362,7 +362,7 @@
<option_ios_texture_page>1024</option_ios_texture_page>
<option_ios_use_test_ads>false</option_ios_use_test_ads>
<option_lastchanged></option_lastchanged>
<option_linux_display_name>AM2R Multitroid 1.4.1</option_linux_display_name>
<option_linux_display_name>AM2R Multitroid 1.4.2</option_linux_display_name>
<option_linux_enable_steam>0</option_linux_enable_steam>
<option_linux_fullscreen>0</option_linux_fullscreen>
<option_linux_homepage>https://www.reddit.com/r/AM2R/</option_linux_homepage>
Expand Down
2 changes: 1 addition & 1 deletion objects/oCharacter.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,10 @@ damage_player(other.damage, 5 * damageDir, -3, 0, combo);
<kind>1</kind>
<string>/// SA-X Projectile Damage
if(global.spectator) exit;
otherOBJ = other.object_index;
if(invincible == 0){
damageDir = -1;
knockbackY = -3;
otherOBJ = other.object_index;
var combo = 0;
if(!(global.item[5] &amp;&amp; global.currentsuit == 2) &amp;&amp; other.ibeam &amp;&amp; otherOBJ == oBeam){
other.damage = other.damage * 0.8;
Expand Down
49 changes: 31 additions & 18 deletions objects/oClient.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ HURT = 32;

sizeX = 1;
sizeY = 1;

global.receiving = false;

beginReceiveTimer = 300;
</string>
</argument>
</arguments>
Expand Down Expand Up @@ -315,6 +319,11 @@ oControl.alarm[10] = 90;
if(banned) popup_text("Banned from server");
if(kicked) popup_text("Kicked from server");

if(global.sax &amp;&amp; global.saxmode){
global.sax = 0;
load_character_vars();
}

global.spectator = false;
global.spectatorIndex = -1;
global.saxmode = 0;
Expand Down Expand Up @@ -1260,13 +1269,13 @@ if(itemCount != global.itemstaken){
buffer = buffer_create(size, type, alignment);
buffer_seek(buffer, buffer_seek_start, 0);
buffer_write(buffer, buffer_u8, 1);
buffer_write(buffer, buffer_string, name);
buffer_write(buffer, buffer_string, name + "," + global.multitroid_version);
buffer_write(buffer, buffer_u8, global.sax);
var bufferSize = buffer_tell(buffer);
buffer_seek(buffer, buffer_seek_start, 0);
buffer_write(buffer, buffer_s32, bufferSize);
buffer_write(buffer, buffer_u8, 1);
buffer_write(buffer, buffer_string, name);
buffer_write(buffer, buffer_string, name + "," + global.multitroid_version);
buffer_write(buffer, buffer_u8, global.sax);
var result = network_send_packet(socket, buffer, buffer_tell(buffer));
instance_create(x, y, oNametag);
Expand Down Expand Up @@ -1851,6 +1860,20 @@ if(currentItemsTimer == 0 &amp;&amp; connected){
var result = network_send_packet(socket, buffer, buffer_tell(buffer));
}

if(beginReceiveTimer == 0 &amp;&amp; connected){
alarm[0] = 5;
alarm[2] = 5;
alarm[3] = 5;
alarm[4] = 5;
alarm[5] = 5;
alarm[6] = 5;
alarm[7] = 5;
alarm[8] = 5;
alarm[9] = 5;
alarm[10] = 3;
alarm[11] = 20;
}

time--;
maxpbombsTimer--;
maxhealthTimer--;
Expand All @@ -1865,11 +1888,14 @@ pbombsTimer--;
disconnectTimer--;
pingTimer--;
currentItemsTimer--;
if(global.receiving) beginReceiveTimer--;

if(resetTimer &gt; -1){
resetTimer--;
}

if(beginReceiveTimer &lt; -1) beginReceiveTimer = -1;

if(instance_exists(self)){
if(ds_list_size(roomListData) &gt; 0){
for(var h=0; h&lt;ds_list_size(roomListData); h++){
Expand Down Expand Up @@ -2486,11 +2512,6 @@ switch(type_event){
var newTeam = buffer_read(_buffer, buffer_u8);
if(newTeam == 1) global.sax = 0;
if(newTeam == 2) global.sax = 1;
if(global.sax){
popup_text("SAX enabled");
} else {
popup_text("SAX disabled");
}
break;
case 112:
var saxmode = buffer_read(_buffer, buffer_u8);
Expand All @@ -2505,8 +2526,10 @@ switch(type_event){
var samCount = buffer_read(_buffer, buffer_u8);
var damageMultStr = buffer_read(_buffer, buffer_string);
var damageMult = real(damageMultStr);
var experimental = buffer_read(_buffer, buffer_u8);
global.damageMult = damageMult;
global.saxmode = saxmode;
global.experimental = experimental;
if(!lobbyLocked){
if(global.spectator){
global.spectator = false;
Expand Down Expand Up @@ -2540,17 +2563,7 @@ switch(type_event){
case 0:
global.clientID = buffer_read(_buffer, buffer_u8);
show_debug_message(string(msgid) + " " + string(global.clientID));
alarm[0] = 5;
alarm[2] = 5;
alarm[3] = 5;
alarm[4] = 5;
alarm[5] = 5;
alarm[6] = 5;
alarm[7] = 5;
alarm[8] = 5;
alarm[9] = 5;
alarm[10] = 3;
alarm[11] = 20;
global.receiving = true;
buffer_delete(buffer);
var size, type, alignment;
size = 1024;
Expand Down
29 changes: 23 additions & 6 deletions objects/oControl.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ global.fontVersion = font_add_sprite_ext(sVersionFont, "V.0123456789", true, 1);

global.am2r_version = "V1.5.2"; // no longer dynamic, not worth the effort to maintain - mostly because of Android oddities.

global.multitroid_version = "V1.4.1";
global.multitroid_version = "V1.4.2";

// Android
global.gamestarted = 0;
Expand Down Expand Up @@ -592,6 +592,12 @@ global.samCount = 0;

global.damageMult = 0;

global.warpPipeCooldown = 0;

global.experimental = false;

global.saveStationCooldown = 0;

reset_map();
load_character_vars();

Expand Down Expand Up @@ -1227,6 +1233,10 @@ if(global.scannerSpeed &lt;= 0){
}
}

if(global.showHealthIndicatorsTimer == 1){
if(global.experimental) global.saveStationCooldown = 60 * 30;
}

if(global.showHealthIndicatorsTimer &gt; 0){
global.showHealthIndicatorsTimer--;
global.showHealthIndicators = true;
Expand Down Expand Up @@ -1270,6 +1280,12 @@ if(!global.spectator) global.reformTimer = 1200;
if(global.playerMapPosTimer == 1) global.mapmarker = 0;

if(global.playerMapPosTimer &gt; 0) global.playerMapPosTimer--;

if(global.warpPipeCooldown &gt; 0) global.warpPipeCooldown--;

if(global.saveStationCooldown &gt; 0) global.saveStationCooldown--;

if(!instance_exists(oClient)) global.experimental = false;
</string>
</argument>
</arguments>
Expand Down Expand Up @@ -1513,9 +1529,10 @@ if (global.mapmarker) {
<argument>
<kind>1</kind>
<string>/// Player death transition
if(global.playerhealth &lt;= 0 &amp;&amp; global.saxmode &amp;&amp; global.sax &amp;&amp; oCharacter.sprite_index != sCoreXSAX) global.playerhealth = 1;

if(global.playerhealth &gt; 0) exit;
if(global.playerhealth &lt;= 0 &amp;&amp; global.saxmode &amp;&amp; global.sax &amp;&amp; oCharacter.sprite_index != sCoreXSAX){
global.playerhealth = 1;
exit;
}

if(instance_exists(oClient) &amp;&amp; oClient.connected){
global.currX = oCharacter.x;
Expand All @@ -1539,7 +1556,7 @@ global.ingame = 0;
global.darkness = 0;
global.gotolog = -1;
global.transitiontype = 3;
if(global.saxmode &amp;&amp; !global.sax &amp;&amp; global.showHealthIndicators) global.spectatorOption = true;
if(global.saxmode &amp;&amp; !global.sax) global.spectatorOption = true;
if(global.spectatorOption &amp;&amp; global.lobbyLocked){
global.spectator = true;
global.spectatorIndex = -1;
Expand Down Expand Up @@ -2133,7 +2150,7 @@ if(global.icemissiles){
popup_text("Ice Missiles disabled");
}
*/
global.spectator = !global.spectator;
//global.spectator = !global.spectator;
</string>
</argument>
</arguments>
Expand Down
3 changes: 2 additions & 1 deletion objects/oCreditsText.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<arguments>
<argument>
<kind>1</kind>
<string>text = "Another " + global.monsterStr + " 2 Remake# # # # # # # # # # # #Producer#Milton 'DoctorM64' Guasti# #Graphic Design#Ramiro Negri#Steve 'Sabre230' Rothlisberger#Jack Witty#Kirill '1Eni1' Fevralev#Jasper#MichaelGabrielR# #Promo Art#Azima 'Zim' Khan# #Writing#James 'Ridley' Hobbs#Paulo 'Latinlingo' Villalobos# #Platform Engine Code#Martin Piecyk# #Music Composition#Milton 'DoctorM64' Guasti#Darren Kerwin#Torbjørn 'Falcool' Brandrud# #Debug#Hemse#Dragondarch#Esteban 'DruidVorse' Criado#Verneri 'Naatiska' Viljanen# #Playtest#Jennifer Potter#Mario Crestanello#Live4Truths#Torbjørn 'Falcool' Brandrud#Lise Trehjørningen#Nommiin#Gabriel Kaplan#Nicolas 'Skol' Del Negro#Darren Kerwin#Robert Sephazon# #Community Management#Dragonheart91#Ammypendent#Karrde# #Special Thanks#Nommiin#Nathan 'wickedclown' Hess#Tyler Rogers#Kousoru#Infinity's End#CapCom#Isabelle Amponin#The " + global.monsterStr + " Community# # # # # #Source Code Reconstruction#YellowAfterlife# # #Continued Revisions# #Lead - Former#Gatordile#Alex 'Wanderer' Mack# #Lead#Lojemiru# #Development#Craig Kostelecky#" + global.monsterStr + "3D# #Art Lead#Dannon 'Shmegleskimo' Yates# #Art#ShirtyScarab#Cooper Garvin#Chris 'Messianic' Oliveira#ChloePlz# #Special Thanks#Banjo, Grom PE,#King Bore, Jean-Samuel Pelletier,#Reaku The Crate, Scooterboot, #Sylandro, TheKhaosDemon, #Unknown, Iwantdevil, #PixHammer, CaptGlitch,#Nokbient, EODTex,#Electrix, gponys,#Japanese Community# # # # # #Original " + global.monsterStr + " II Staff# #Producer#Gunpei Yokoi# #Director#Hiroji Kiyotake, Hiroyuki Kimura# #Main Programmer#Takahiro Harada# #Programmer#Masaru Yamanaka, Masao Yamamoto,#Isao Hirano# #Graphic Designer#Hiroji Kiyotake, Hiroyuki Kimura# #Program Assistant#Yuzuru Ogawa, Nobuhiro Ozaki# #Sound Programmer#Ryohji Yoshitomi# #Designer#Makoto Kanoh, Masafumi Sakashita,#Tomoyoshi Yamane, Takehiko Hosokawa,#Yasuo Inoue# #Debug#Masaru Okadaga, Kenji Nishizawa,#Hirofumi Matsuoka, Tohru Ohsawa,#Kohta Fukui, Keisuke Terasaki,#Kenichi Sugino, Hitoshi Yamagami,#Katsuya Yamaoe, Yuji Hori# #Co-op Mod#milesthenerd#xzackly7# # # # # # # # #In Memory of Satoru Iwata";
<string>if(global.saxmode) room_goto(rm_score);
text = "Another " + global.monsterStr + " 2 Remake# # # # # # # # # # # #Producer#Milton 'DoctorM64' Guasti# #Graphic Design#Ramiro Negri#Steve 'Sabre230' Rothlisberger#Jack Witty#Kirill '1Eni1' Fevralev#Jasper#MichaelGabrielR# #Promo Art#Azima 'Zim' Khan# #Writing#James 'Ridley' Hobbs#Paulo 'Latinlingo' Villalobos# #Platform Engine Code#Martin Piecyk# #Music Composition#Milton 'DoctorM64' Guasti#Darren Kerwin#Torbjørn 'Falcool' Brandrud# #Debug#Hemse#Dragondarch#Esteban 'DruidVorse' Criado#Verneri 'Naatiska' Viljanen# #Playtest#Jennifer Potter#Mario Crestanello#Live4Truths#Torbjørn 'Falcool' Brandrud#Lise Trehjørningen#Nommiin#Gabriel Kaplan#Nicolas 'Skol' Del Negro#Darren Kerwin#Robert Sephazon# #Community Management#Dragonheart91#Ammypendent#Karrde# #Special Thanks#Nommiin#Nathan 'wickedclown' Hess#Tyler Rogers#Kousoru#Infinity's End#CapCom#Isabelle Amponin#The " + global.monsterStr + " Community# # # # # #Source Code Reconstruction#YellowAfterlife# # #Continued Revisions# #Lead - Former#Gatordile#Alex 'Wanderer' Mack# #Lead#Lojemiru# #Development#Craig Kostelecky#" + global.monsterStr + "3D# #Art Lead#Dannon 'Shmegleskimo' Yates# #Art#ShirtyScarab#Cooper Garvin#Chris 'Messianic' Oliveira#ChloePlz# #Special Thanks#Banjo, Grom PE,#King Bore, Jean-Samuel Pelletier,#Reaku The Crate, Scooterboot, #Sylandro, TheKhaosDemon, #Unknown, Iwantdevil, #PixHammer, CaptGlitch,#Nokbient, EODTex,#Electrix, gponys,#Japanese Community# # # # # #Original " + global.monsterStr + " II Staff# #Producer#Gunpei Yokoi# #Director#Hiroji Kiyotake, Hiroyuki Kimura# #Main Programmer#Takahiro Harada# #Programmer#Masaru Yamanaka, Masao Yamamoto,#Isao Hirano# #Graphic Designer#Hiroji Kiyotake, Hiroyuki Kimura# #Program Assistant#Yuzuru Ogawa, Nobuhiro Ozaki# #Sound Programmer#Ryohji Yoshitomi# #Designer#Makoto Kanoh, Masafumi Sakashita,#Tomoyoshi Yamane, Takehiko Hosokawa,#Yasuo Inoue# #Debug#Masaru Okadaga, Kenji Nishizawa,#Hirofumi Matsuoka, Tohru Ohsawa,#Kohta Fukui, Keisuke Terasaki,#Kenichi Sugino, Hitoshi Yamagami,#Katsuya Yamaoe, Yuji Hori# #Co-op Mod#milesthenerd#xzackly7# # # # # # # # #In Memory of Satoru Iwata";

yoffset = 0;
fadeout = 0;
Expand Down
2 changes: 1 addition & 1 deletion objects/oDeathSequenceMulti.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<arguments>
<argument>
<kind>1</kind>
<string>image_speed = 0.25;
<string>image_speed = 0.125;
image_index = 0;
fade = 0;
moveplayer = 0;
Expand Down
2 changes: 1 addition & 1 deletion objects/oDrillSeq1.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ with (oCharacter) {
morphing = 0;
turning = 0;
}
immersion_stop();
if (os_type == os_android) immersion_stop();
instance_destroy();
</string>
</argument>
Expand Down
2 changes: 1 addition & 1 deletion objects/oDrillSeq2.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ with (oCharacter) {
morphing = 0;
turning = 0;
}
immersion_stop();
if (os_type == os_android) immersion_stop();
instance_destroy();
</string>
</argument>
Expand Down
3 changes: 2 additions & 1 deletion objects/oEMPNoise.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<arguments>
<argument>
<kind>1</kind>
<string>xoff = 0;
<string>if(global.saxmode) instance_destroy();
xoff = 0;
yoff = 0;
alarm[0] = 1;
</string>
Expand Down
5 changes: 5 additions & 0 deletions objects/oIntroController.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
<kind>1</kind>
<string>alarm[0] = 180;
txt = get_text("Title", "ControllerRecommended");
// If on Linux, quickly toggle fullscreen to get rid of GM:S mess. Seemed to be the best place to do that.
if (os_type == os_linux &amp;&amp; global.opfullscreen) {
window_set_fullscreen(false);
window_set_fullscreen(true);
}
</string>
</argument>
</arguments>
Expand Down
2 changes: 2 additions & 0 deletions objects/oMapCursor.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ alarm[0] = 2;
active = 0;
alarm[1] = 5;
state = 0;
marker = 0;
camera = 0;
if (global.mapmarker == 1) {
state = 2;
marker = instance_create(x, y, oMapMarker);
Expand Down
2 changes: 1 addition & 1 deletion objects/oSaveShip.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if (enabled == 1 &amp;&amp; image_index &lt; 9) image_index += 0.5;
if (enabled == 0 &amp;&amp; image_index &gt; 0.2) image_index -= 0.5;
//
if (saveenabled == 1 &amp;&amp; cansave == 1 &amp;&amp; (oCharacter.state == 10 || oCharacter.state == 12) &amp;&amp; oCharacter.statetime &gt;= 10) {
if ((oControl.mod_insanitymode == 1 &amp;&amp; global.event[304] == 0) || global.enemyNearby) { exit; }
if ((oControl.mod_insanitymode == 1 &amp;&amp; global.event[304] == 0) || (global.enemyNearby &amp;&amp; global.saxmode &amp;&amp; global.event[304] == 0) || (global.sax &amp;&amp; global.saxmode) || global.saveStationCooldown &gt; 0) { exit; }
//if (oControl.mod_insanitymode == 1) { exit; }
global.savexpos = x + 16;
global.start_room = rm_a0h01;
Expand Down
2 changes: 1 addition & 1 deletion objects/oSaveStation.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if (enabled == 1 &amp;&amp; image_index &lt; sprite_get_number(sprite_index) - 1
if (enabled == 0 &amp;&amp; image_index &gt; 0.2) image_index -= 0.2;
//
if (saveenabled == 1 &amp;&amp; cansave == 1 &amp;&amp; (oCharacter.state == 10 || oCharacter.state == 12) &amp;&amp; (oCharacter.statetime &gt;= 10 || oControl.kUp)) {
if (oControl.mod_insanitymode == 1 || global.enemyNearby) { exit; }
if (oControl.mod_insanitymode == 1 || (global.enemyNearby &amp;&amp; global.saxmode) || global.saveStationCooldown &gt; 0) { exit; }
global.savexpos = x + 16;
saveenabled = 0;
with (oCharacter) {
Expand Down
5 changes: 4 additions & 1 deletion objects/oScoreScreen.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ if (state == 2) {
}
if (statetime == 60) sfx_play(sndTLM);
if (statetime == 600) fadeout = 1;
if (statetime == 900) event_user(0);
if (statetime == 900){
mus_fadeout(musCredits);
event_user(0);
}
if (fadeout) {
if (ralpha &lt; 1) ralpha += 0.01;
}
Expand Down
21 changes: 12 additions & 9 deletions objects/oWarpPipeTrigger.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
<arguments>
<argument>
<kind>1</kind>
<string>if(global.spectator) instance_destroy();
posx = x + 8;
<string>posx = x + 8;
state = 0;
statetime = 0;
door_open = 0;
Expand Down Expand Up @@ -84,6 +83,7 @@ alarm[0] = 1;
<argument>
<kind>1</kind>
<string>//if (instance_id == inst_133698) exit;
if(global.spectator) instance_destroy();

if (state == 1) {
if (statetime == 0) {
Expand Down Expand Up @@ -119,6 +119,7 @@ if (state == 1) {
global.offsety = 0;
oCharacter.x = 0;//
oCharacter.y = 0;//
if(global.saxmode) global.warpPipeCooldown = 360;
room_change(targetroom, 0);
Mute_Loops();
}
Expand Down Expand Up @@ -196,16 +197,18 @@ statetime += 1;
<argument>
<kind>1</kind>
<string>//if (instance_id == inst_133698) { exit; }

if (other.state == 23 &amp;&amp; other.xVel == 0 &amp;&amp; state == 0) {
with (other) {
state = 60;
if(global.warpPipeCooldown == 0){
if (other.state == 23 &amp;&amp; other.xVel == 0 &amp;&amp; state == 0) {
with (other) {
state = 60;
statetime = 0;
}
state = 1;
statetime = 0;
sfx_play(sndMorphBallSlot);
}
state = 1;
statetime = 0;
sfx_play(sndMorphBallSlot);
}

</string>
</argument>
</arguments>
Expand Down
Loading

0 comments on commit d7becb8

Please sign in to comment.