Items should be unuseable in the hub area. Reset ability cooldowns at the start of a stage.
This commit is contained in:
parent
18810875a5
commit
51e838de24
@ -66,6 +66,8 @@ struct Ability{
|
|||||||
bool canCancelCast=false;
|
bool canCancelCast=false;
|
||||||
InputGroup*input;
|
InputGroup*input;
|
||||||
std::string icon;
|
std::string icon;
|
||||||
|
//If set to true, this ability is tied to using an item.
|
||||||
|
bool itemAbility=false;
|
||||||
//If set to true, this ability instead activates immediately when a cast occurs. When the cast finishes, nothing happens instead.
|
//If set to true, this ability instead activates immediately when a cast occurs. When the cast finishes, nothing happens instead.
|
||||||
bool actionPerformedDuringCast=false;
|
bool actionPerformedDuringCast=false;
|
||||||
bool waitForRelease=false;
|
bool waitForRelease=false;
|
||||||
|
@ -1982,6 +1982,12 @@ void AiL::LoadLevel(MapName map){
|
|||||||
}
|
}
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
player->GetAbility1().cooldown=0.f;
|
||||||
|
player->GetAbility2().cooldown=0.f;
|
||||||
|
player->GetAbility3().cooldown=0.f;
|
||||||
|
player->GetAbility4().cooldown=0.f;
|
||||||
|
player->GetRightClickAbility().cooldown=0.f;
|
||||||
|
|
||||||
player->upperLevel=false; //Assume player starts on lower level.
|
player->upperLevel=false; //Assume player starts on lower level.
|
||||||
player->ForceSetPos(MAP_DATA[map].MapData.playerSpawnLocation); //Normal set pos does one axis and then the other, so this will make sure that we actually end up at the right spot and ignore collision rules.
|
player->ForceSetPos(MAP_DATA[map].MapData.playerSpawnLocation); //Normal set pos does one axis and then the other, so this will make sure that we actually end up at the right spot and ignore collision rules.
|
||||||
|
|
||||||
@ -2745,6 +2751,7 @@ void AiL::SetLoadoutItem(int slot,std::string itemName){
|
|||||||
}
|
}
|
||||||
Ability itemAbility{itemName,"","","Item.Item Cooldown Time"_F,0,inputGroup,"items/"+itemName+".png",VERY_DARK_RED,DARK_RED,PrecastData{GetLoadoutItem(slot).lock()->CastTime(),0,0},true};
|
Ability itemAbility{itemName,"","","Item.Item Cooldown Time"_F,0,inputGroup,"items/"+itemName+".png",VERY_DARK_RED,DARK_RED,PrecastData{GetLoadoutItem(slot).lock()->CastTime(),0,0},true};
|
||||||
itemAbility.actionPerformedDuringCast=GetLoadoutItem(slot).lock()->UseDuringCast();
|
itemAbility.actionPerformedDuringCast=GetLoadoutItem(slot).lock()->UseDuringCast();
|
||||||
|
itemAbility.itemAbility=true;
|
||||||
|
|
||||||
switch(slot){
|
switch(slot){
|
||||||
case 0:{
|
case 0:{
|
||||||
|
@ -672,7 +672,9 @@ bool Player::CanAct(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Player::CanAct(Ability&ability){
|
bool Player::CanAct(Ability&ability){
|
||||||
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&(GameState::STATE==GameState::states[States::GAME_RUN]||GameState::STATE==GameState::states[States::GAME_HUB]);
|
return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&
|
||||||
|
(GameState::STATE==GameState::states[States::GAME_RUN]
|
||||||
|
||GameState::STATE==GameState::states[States::GAME_HUB]&&!ability.itemAbility);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::HasIframes(){
|
bool Player::HasIframes(){
|
||||||
|
@ -27,6 +27,8 @@ Settings Menu
|
|||||||
|
|
||||||
- No equip sounds for weapons?
|
- No equip sounds for weapons?
|
||||||
|
|
||||||
|
- When setting loadout items while loading the game it should highlight the correct item in the consumables inventory as well.
|
||||||
|
|
||||||
January 31st
|
January 31st
|
||||||
============
|
============
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 6515
|
#define VERSION_BUILD 6517
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user