-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up firing data #14
base: main
Are you sure you want to change the base?
Conversation
FiringResponse no longer has seperate fields for pve/pvp
they broke because pve bonuses were calced in wasm bindings
pub impact_damage: f64, | ||
#[wasm_bindgen(js_name = "ExplosionDamage", readonly)] | ||
pub explosion_damage: f64, | ||
#[wasm_bindgen(js_name = "CritMult", readonly)] | ||
pub crit_mult: f64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naive question: will you ever be able to get away from floats, are you stuck with them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what alternative would you suggest? something like the rust_decimal
crate?
i'll be doing a pretty big changes soon, so if the need is there i don't mind throwing that in
|
||
if !_pvp { | ||
let persistent = crate::PERS_DATA.with(|_perm_data| _perm_data.borrow().clone()); | ||
out.apply_pve_bonuses( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the idea that you'd calculate a base value of damage and subsequently apply multipliers for different activities?
If so, the approach I might suggest to make _pvp
not a boolean, but rather, an enum that currently contains PvE and PvP. Since they're going to be adding additional PvP modes with different TTKs in season 22, I think might be worthwhile to get ahead of this while you're changing things here.
@BarmonHammer we can pick this back up while removing the breaking changes for kat if that's holding it up, we should probably start supporting a v2 API that we can rapidly iterate on and test while trying to keep it as close to the current one, then kat can update as she wants if ever. Any type of dps simulation will need to change how the user interacts with weapons so might as well start now. |
No description provided.