FIXES A RARE CRASH BUG (finally)

This commit is contained in:
kevinmonitor 2022-09-18 12:17:54 +07:00
parent 254380d4a5
commit 0389c77424
1 changed files with 9 additions and 5 deletions

View File

@ -17,8 +17,9 @@
#include "script/KevinSystem/kevin_system/Kevin_ItemConst.txt" #include "script/KevinSystem/kevin_system/Kevin_ItemConst.txt"
#include "script/KevinSystem/kevin_system/Kevin_ItemLib.txt" #include "script/KevinSystem/kevin_system/Kevin_ItemLib.txt"
float shotDamage = 2.4+(GetCommonData("Rank", 1)*0.125); float shotDamage = 2.4+(GetCommonData("Rank", 1)*0.3);
float shotScale = 0.6+(GetCommonData("Rank", 1)*0.125); float shotScale = 0.6+(GetCommonData("Rank", 1)*0.125);
float shotSpeed = 50+(GetCommonData("Rank", 1)*1.5);
let csd = GetCurrentScriptDirectory(); let csd = GetCurrentScriptDirectory();
@ -93,6 +94,8 @@ const EV_PIV_2000 = EV_USER + 103i; // What.
// Shot functions // Shot functions
SetPlayerSpell(99);
_CAVELaser(); _CAVELaser();
_ShotType(); _ShotType();
//UniversalAlphaHandle(_shotArray); //UniversalAlphaHandle(_shotArray);
@ -457,8 +460,9 @@ task _ShotType(){
task UpdateParam(){ task UpdateParam(){
loop{ loop{
shotDamage = 2.4+(GetCommonData("Rank", 1)*0.125); shotDamage = 2.4+(GetCommonData("Rank", 1)*0.3);
shotScale = 0.6+(GetCommonData("Rank", 1)*0.125); shotScale = 0.6+(GetCommonData("Rank", 1)*0.125);
shotSpeed = 50+(GetCommonData("Rank", 1)*1.25);
wait(60); wait(60);
} }
} }
@ -468,7 +472,7 @@ task _ShotType(){
loop{ loop{
if(GetVirtualKeyState(VK_SHOT) != KEY_FREE && IsPermitPlayerShot && !ripplayer){ if(GetVirtualKeyState(VK_SHOT) != KEY_FREE && IsPermitPlayerShot && !ripplayer){
if(shotspeed % 4 == 0){ if(shotspeed % 4 == 0){
let shotB = CreatePlayerShotA1(playerX, playerY, 50, 270, 2.6, shotDamage*1.25, 1); let shotB = CreatePlayerShotA1(playerX, playerY, shotSpeed, 270, 2.6, shotDamage*1.25, 1);
_BulletRescalePlayer(shotB, shotScale, true, 1); _BulletRescalePlayer(shotB, shotScale, true, 1);
ObjRender_SetAlpha(shotB, shotAlpha); ObjRender_SetAlpha(shotB, shotAlpha);
Obj_SetRenderPriorityI(shotB, 41); Obj_SetRenderPriorityI(shotB, 41);
@ -560,7 +564,7 @@ task _ShotType(){
if(value == 1 || value == 3) {angSwing = 6;} if(value == 1 || value == 3) {angSwing = 6;}
else{angSwing = 4;} else{angSwing = 4;}
let shotA = CreatePlayerShotA1(x, y, 50, ObjMove_GetAngle(option)+angSwing*multiplier*angMultiplier, shotDamage*1.2, 1.1, 1); let shotA = CreatePlayerShotA1(x, y, shotSpeed, ObjMove_GetAngle(option)+angSwing*multiplier*angMultiplier, shotDamage*1.2, 1.1, 1);
_BulletRescalePlayer(shotA, shotScale, true, 1); _BulletRescalePlayer(shotA, shotScale, true, 1);
ObjRender_SetAlpha(shotA, shotAlpha); ObjRender_SetAlpha(shotA, shotAlpha);
Obj_SetRenderPriorityI(shotA, 41); Obj_SetRenderPriorityI(shotA, 41);
@ -780,7 +784,7 @@ task _Bomb(){
ObjRender_SetBlendType(shotA, BLEND_ADD_ARGB); ObjRender_SetBlendType(shotA, BLEND_ADD_ARGB);
Obj_SetRenderPriorityI(shotA, 41); Obj_SetRenderPriorityI(shotA, 41);
ObjShot_SetPenetrateShotEnable(shotA, false); ObjShot_SetPenetrateShotEnable(shotA, false);
ObjShot_SetEnemyIntersectionInvalidFrame(shotA, 2); //ObjShot_SetEnemyIntersectionInvalidFrame(shotA, 5); // CURRENTLY BUGGED AS OF PH3SX 1.32B
ObjShot_SetSpellFactor(shotA, true); ObjShot_SetSpellFactor(shotA, true);
ObjShot_SetEraseShot(shotA, true); ObjShot_SetEraseShot(shotA, true);
} }