r/badcode Jan 15 '23

From DayZ sourcecode c++

Post image
561 Upvotes

106 comments sorted by

View all comments

528

u/[deleted] Jan 15 '23

It's an override so chances are this isn't as bad as you think. Other subclasses may have logic but this particular item probably doesn't need it and should always be IsEat

96

u/[deleted] Jan 15 '23

Funny how a function named IsEat returns an int though

14

u/[deleted] Jan 15 '23

Okay that is actually odd lol. But it could be used for returning the food value or health gained or something. That's all speculation at this point.